• Advertisement
Sign in to follow this  

C++ Class Problem

This topic is 2987 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

I've decided to attempt to write a simple dungeon crawler using SDL in C++. A significant part of this is that it will have randomly generated levels. Since I made a maze generating program last year in Java for extra credit in a class, I figured that algorithm would be highly useful as it was pretty much the dungeon level generator right there. I just needed to port it to C++. Well, that's where something is not going right in one of my C++ classes. When attempting to compile, I get these errors:
****/Cell.h|7|error: new types may not be defined in a return type|
****/Cell.h|7|note: (perhaps a semicolon is missing after the definition of ‘Cell’)|
****/Cell.cpp|3|error: return type specification for constructor invalid|
||=== Build finished: 2 errors, 0 warnings ===|
(Edited to remove absolute filepath) Code: Cell.h -> http://pastebin.org/67968 Cell.cpp -> http://pastebin.org/67969 I've looked through the code and have been unable to locate the problem.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement