sizeof function resolution
-
hi if using sizeof function will this be resolved during 1. runtime 2. compile time 3. pre-compile time please give me answers
-
hi if using sizeof function will this be resolved during 1. runtime 2. compile time 3. pre-compile time please give me answers
sizeof() is not a function, but a compile time operator. (Amazingly enough Google gives that answer as the second hit.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
hi if using sizeof function will this be resolved during 1. runtime 2. compile time 3. pre-compile time please give me answers
-
Have you tried to figure this out for yourself ? Most compilers can write their preprocessor output and this would tell you.
York, can u hint how to do it.. plz..
-
York, can u hint how to do it.. plz..
One way to see this is to have the compiler generate machine and assembly source (in output, depending on the compiler.) If you don't understand assembly, though, it may not do much good.
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
York, can u hint how to do it.. plz..
If you are using Microsoft compiler, Take a look its (CL.EXE) options -
cl.exe /?
-PREPROCESSOR-
/AI<dir> add to assembly search path /FU<file> forced using assembly/module
/C don't strip comments /D<name>{=|#}<text> define macro
/E preprocess to stdout /EP preprocess to stdout, no #line
/P preprocess to file /Fx merge injected code to file
/FI<file> name forced include file /U<name> remove predefined macro
/u remove all predefined macros /I<dir> add to include search path
/X ignore "standard places"