is it possible to write a macro to achieve this?

T

thinktwice

i want to define a macro like

#define STRING2(x) #x
#define STRING(x) STRING2(x)

#define PROMPT(x) #pragma message(__FILE__ "(" STRING(__LINE__) "):"
STRING(x)) <---- compile failed

i want to use this macro to remind me that something need to be done
but not done yet. is it possible to write such a macro??
 
A

Alexander Bernauer

thinktwice said:
i want to use this macro to remind me that something need to be done
but not done yet.

Why not just use #warning?

Given your compiler supports this directive of course.

cu
 
F

Frank Bergemann

Hi,

why not just using "TODO" in comments for the related locations?
You then can just grep for "TODO" for you consilidation / clean-up
phase in coding.
Also IDE like eclipse will highlight "TODOs" in their viewer with
notepad icon or alike.

rgds
Frank
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top