Tuesday 15 May 2012

c - C89 - error: expected ')' before '*' token -



c - C89 - error: expected ')' before '*' token -

i getting error within c.

error: expected ')' before '*' token

but cannot trace it.

void print_struct(struct_alias *s) //error within line { ... } //end of print method

my question when receiving error can error stem to? problem function, can error beingness passed in? what scope of error?

the compiler doesn't recognize name struct_alias type name.

for code compile, struct_alias have declared typedef, , declaration have visible compiler when sees definition of print_struct.

(typedef names tricky. in effect, become temporarily user-defined keywords, why errors involving them can produce such confusing error messages.)

this not specific c89; applies as c90 (which same language c89), c99, , c11.

c c89

No comments:

Post a Comment