   ToDo Makro
  Hey people.I want to make a makro called ToDo(".....")e.g.:ToDo("Check if this IF is ok")->compiling.........n_tools.cpp <-> ToDo: Check if this IF is ok - Line 35Now i know how i put a massage at the compiling process#pragma message ("Message")but is there a way to add " <-> ToDo: " in front of the message and the " - Line n" at the end of it?It would be nice if someone could gibe me some hints.Christian 
  Sure, try something like this: #define ToDo(TASK) /{   /    char OutputResult[512];  /    sprintf(OutputResult, "<-> ToDo: %s - Line %d", TASK, __LINE__);/    #pragma message(OutputResult) /}I didn't test it, but it should work.   -UltimaX-Ariel Productions"You wished for a white christmas... Now go shovel your wishes!"   [edited by - UltimaX on February 3, 2004 5:29:20 PM];  Look up __FILE__, __LINE__. ;  I think UltimaX must have been joking...Here''s some working and tested code instead: #define __TOSTR2__(x) #x#define __TOSTR__(x) __TOSTR2__(x)#define __STRLINE__ __TOSTR__(__LINE__)#define TODO(Task) message (" <-> ToDo: " #Task " - Line " __STRLINE__)  void ArbitraryFunction(){#pragma TODO(Something)};  Thanks Mattias Welander. Your code works perfectly ;  Is there a way to get the #pragma in the macro as well?IE I just want to call TODO("BLAH&quot and get it when i compile...