16 Jul 09:01
Several questions on C++
boost_www <boost_www <at> foxmail.com>
2008-07-16 07:01:54 GMT
2008-07-16 07:01:54 GMT
Hello Sorry, I have several questions on C++ instead of any boost library. But I believe the boost guys could easily give me help.1) I found code fragment like this, esp. in macro definitions: do { \ \ // ... \ } while(0) Why is the do/while clause needed here? 2) I found large amount of code like this in a class implementation: AClass::func() { this->func1(); } Why is 'this->' needed? Thanks for any help. B/Rgds Max
_______________________________________________ Boost-users mailing list Boost-users <at> lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
1) I found code fragment like this, esp. in macro definitions:
do { \
\
// ... \
} while(0)
Why is the do/while clause needed here?
2) I found large amount of code like this in a class implementation:
AClass::func()
{
this->func1();
}
Why is 'this->' needed?
Thanks for any help.
B/Rgds
Max
RSS Feed