All pastes #92555 Raw Edit

Mine

public text v1 · immutable
#92555 ·published 2006-07-19 17:29 UTC
rendered paste body
Below, two macros are defined at the top of the program, and soon after main() is called, printStatusUpdateHeader(); is encountered. Im having issues getting the preprocessor to do what I want it. Is there a better way to terminate multi-line macros?

######################### CODE FRAGMENT 1

#define printStatusUpdateHeader(); \
 fprintf(stderr,"\norbits | del_periastron | time (s),MJD | "); \
 fprintf(stderr,"\n-------+----------------+--------------+"); \
 fprintf(stderr,"\n-------+----------------+--------------+"); 



...produces output

orbits | del_periastron | time (s),MJD | 
-------+----------------+--------------+
0  3.4906585015e-03  7080000,8.194444e+01


######################### CODE FRAGMENT 2


#define printStatusUpdateHeader(); \
 fprintf(stderr,"\norbits | del_periastron | time (s),MJD | "); \
 fprintf(stderr,"\n-------+----------------+--------------+"); 


..produces output
orbits | del_periastron | time (s),MJD |