开发者

Funny error messages when compiling a C file

Um, I'm a bit new to C so I'm wondering as to why would it gives me the following error messages when compiling this lines:

   void (ESCALLBACK *drawFunc) ( void* );
   void (ESCALLBACK *keyFunc) ( void*, u开发者_开发技巧nsigned char, int, int );

For the first line it gives me:

  error: expected ‘)’ before ‘*’ token

And for the second:

  error: expected ‘;’ before ‘void’

It's quite possible that I am not giving you enough info, but for the moment I am wondering why would it print such error messages. I mean, they don't look very helpful and I don't think they even come close to the real problem here.

Sorry if I sound silly, I am a Java dev learning C.

Thanks!


This probably means that ESCALLBACK isn't defined and it's misparsing the rest of the line (and so giving you an unhelpful error).

Make sure you're including the header that defines ESCALLBACK.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜