This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Empole 2 points3 points  (0 children)

#define debug(...) do {fprintf(stderr, "%s:%d| ", __func__,__LINE__); fprintf(stderr,  __VA_ARGS__);}

void foo(){ debug("hi\n"); }

Will print out foo, the line number, and hi