[C] syntax error

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
Bughunter
Member
Member
Posts: 94
Joined: Mon Dec 18, 2006 5:49 am
Location: Netherlands
Contact:

[C] syntax error

Post by Bughunter »

Code: Select all

void *pHeader = (void*)((unsigned long)ptr - HEADERSIZE);
This line is giving me an error telling me this:
"error: syntax error before ';' token"

Can anyone tell me what is wrong?

EDIT: Found it:

Code: Select all

#define HEADERSIZE sizeof(unsigned int);
This gave the error, it should be:

Code: Select all

#define HEADERSIZE sizeof(unsigned int)
Post Reply