Re: Need help for NULL constant in C++
On 2007-09-12 05:57:50 -0400, Hemu <hemu.mits@gmail.com> said:
On Sep 11, 11:09 am, love307 <minhtu...@gmail.com> wrote:
I don't know why when debug: a = 0x0000000;
but we still call printMessage function.
Thank for your help!
Bui Minh Tu
one possible reason of this may be that the memory for a varibale is
allocated at the run time but compiler , at the compile time resolves
the call for a function
and hard code it in the binary file at the build time and thats why I
believe this code is working.
Well, the code is "working" in the broad sense that it's doing
something reasonable that can be explained without excessive logical
contortions. Nevertheless, it isn't "working" in the narrow sense of
doing what the language definition says that it does, because the
language definition doesn't say what it should do. The code is simply
wrong, and speculating about why it does what it does is wasted time.
--
Pete
Roundhouse Consulting, Ltd. (www.versatilecoding.com) Author of "The
Standard C++ Library Extensions: a Tutorial and Reference
(www.petebecker.com/tr1book)