Macros !!!

Really a wonderful thing , provides a lot of facilities to the developer.

Some useful macros in Microsoft C++ are,

__DATE__ //a string literal containing the compilation date in the form Mmm dd yyyy eg:"Jun 13 2008" of the current source file.
__TIME__ //a string literal containing the compilation time in the form hh:mm:ss eg:"10:01:07" of the current source file.
__FILE__ //a string literal containing the name of the source file being compiled
__LINE__ //a decimal integer constant containing the current line number in the source file

for example, you can use like this 🙂

        CErrorLogger::SendErrorMessage(_T("Can't load the values from Settings.ini file."),__FILE__,__LINE__);

Which produce the error message with file name and line number. During debugging these informations are so useful. 😛