P
Pete Becker
Efrat said:I'd like to define an ASSERT macro that runs in debug/release modes
orthogonal to those of the compiler (I'm debuggin thread-races), and prints
file + line info. To my embarassment, I can't remember the proper way to
define the macro - I seem to vaguely recall something about defining
something like do{ ... }while(0) for some reason, but I can't remember why.
So, if someone could post a 3-5 line ASSERT macro, I'd really appreciate it.
Look in the header <assert.h>.