error in class

Started by
0 comments, last by nagromo 20 years, 5 months ago
C++, Dev-C++, SDL: I am writing a class, and my compiler gave me the following error: 21 ISO C++ forbids defining types within return type [21] Character::Character(u16 x,u16 y,const char *filename) is the definition. The declaration (in class Character) is: Character(u16,u16,const char *); included in an earlier header is: typedef Uint16 u16; can anyone please explain this error?
Advertisement
quote:Original post by nagromo
21 ISO C++ forbids defining types within return type
[...]
can anyone please explain this error?

I''m guessing, but it might mean you''ve failed to put a semicolon at the end of your class declaration. You should really post a minimal but complete code sample if you want a better answer.

This topic is closed to new replies.

Advertisement