Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > is it possible to write a macro to achieve this?

Reply
Thread Tools

is it possible to write a macro to achieve this?

 
 
thinktwice
Guest
Posts: n/a
 
      04-15-2008
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??
 
Reply With Quote
 
 
 
 
Alexander Bernauer
Guest
Posts: n/a
 
      04-16-2008
thinktwice <(E-Mail Removed)> wrote:
> 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
 
Reply With Quote
 
 
 
 
Frank Bergemann
Guest
Posts: n/a
 
      04-16-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to achieve this? Taras_96 Java 22 02-20-2009 05:35 PM
Quality Website Design At Third World Prices Is It Possible To Achieve? Heidy NZ Computing 2 06-19-2007 11:10 AM
Quality Website Design At Third World Prices Is It Possible To Achieve? Heidy Computer Support 8 06-16-2007 09:49 AM
is it possible to write such a macro? fei.liu@gmail.com C Programming 7 03-25-2006 12:05 AM
#define macro to enclose an older macro with strings Dead RAM C++ 20 07-14-2004 10:58 AM



Advertisments