I know that in c++ there are a few predefined macros, and I want to take apart the stdlib to see how it works, and I think I should do this by trying to go through all of the preprocessor statements, and I want to know if there are any other macros that are already defined that I should know about
here are the ones I already know about:
__cplusplus
and that is about it
predefined macros
Started by
Guest_x42_*
, Jun 20 2010 05:45 PM
2 replies to this topic
#1
Guest_x42_*
Posted 20 June 2010 - 05:45 PM
Guest_x42_*
|
|
|
#2
Posted 20 June 2010 - 08:21 PM
I googled compiler macros:
Pre-defined C/C++ Compiler Macros, seems a fair list.
But the most common I can think of:
Pre-defined C/C++ Compiler Macros, seems a fair list.
But the most common I can think of:
Quote
__LINE__ Integer value representing the current line in the source code file being compiled.
__FILE__ A string literal containing the presumed name of the source file being compiled.
__DATE__ A string literal in the form "Mmm dd yyyy" containing the date in which the compilation process began.
__TIME__ A string literal in the form "hh:mm:ss" containing the time at which the compilation process began.
__FILE__ A string literal containing the presumed name of the source file being compiled.
__DATE__ A string literal in the form "Mmm dd yyyy" containing the date in which the compilation process began.
__TIME__ A string literal in the form "hh:mm:ss" containing the time at which the compilation process began.
#3
Posted 20 June 2010 - 08:40 PM
You can also use __VA_ARGS__ to use with variadic macros (#define macros that can take a variable number of arguments).
sudo rm -rf /
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top










