61 people looked at this post and noone came up with it... But I found it and its really pretty useful, so here it is:


Its a macro, and you can insert it into the iostream or a printf from stdio

__FILE__ // the complete path of the cpp file the macro is called from

__DATE__ // date of the compilation : month, dd, yyyy

__TIME__ // time of the compilation