This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Syntax error using macros

Hi,

I get a error C141: syntax error near ';'

with the following code:

struct process {
  struct process *next;
  const char *name;
};
#define AMACRO(name, strname)                   \ 
  struct process name = { NULL, strname  };

AMACRO(my_process, "HELLO");

This seems to compile neatly on MS VC++ and gcc.

Regards,
Umar

0