Archived

This topic is now archived and is closed to further replies.

error in class

This topic is 5151 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites