This topic is now archived and is closed to further replies.


C++ ellipsis in a macro for debugging?

Recommended Posts

I'm trying to set up my debugging scheme for my engine. Here's what Write() looks like: bool Write (char*, ...); I want to debug like this: WRITE_ERROR("Bad filename - %s", Filename); with WRITE_ERROR being some kind of macro or something that prints out __FILE__ and __LINE__ as well without having me write out that extra line of code for each WRITE_ERROR statement. I would like something like this, although I don't think it's possible: #define WRITE_ERROR(STR, ...) { Write(STR, __FILE__, __LINE__); } Any ideas how to do this? Thanks
[JESUS SAVES] [edited by - gilligancoder on August 8, 2003 9:33:14 PM] [edited by - gilligancoder on August 8, 2003 9:34:13 PM]

Share this post

Link to post
Share on other sites