17 Jul 04:26
Re: Several questions on C++
Marshall Clow <marshall <at> idio.com>
2008-07-17 02:26:11 GMT
2008-07-17 02:26:11 GMT
At 9:47 AM +0800 7/17/08, boost_www wrote: >hello Nat, > >Thanks you very much for your explanation! > >for 1), I never heard of that idiom. In fact, after playing with C++ >for more thant 10 years, I am still keeping finding interesting corners >of the language. :) > >What I get from your information is that, the do/while clause is >a MUST-HAVE and is obviously intentional. Absolutely. >for 2), it seems that 'this->' is a question of coding style and generally >we could omit it. Generally, but not always. If you want to call a member function (_especially_ in templated/library code), then you should qualify it with "this->", because you don't know if there will be a function named "func1" available when the code is compiled. -- -- -- Marshall Marshall Clow Idio Software <mailto:marshall <at> idio.com> It is by caffeine alone I set my mind in motion. It is by the beans of Java that thoughts acquire speed, the hands acquire shaking, the shaking becomes a warning. It is by caffeine alone I set my mind in motion.
RSS Feed