Search Results

Search found 1 results on 1 pages for 'user2969329'.

Page 1/1 | 1 

  • C++ Eclipse error class mynamespace::mynamespace

    - by user2969329
    I'm new to C++, coming from a Java and web programming background. I specified a header file, with class definition. The class and the namespace have the same name. I do not know if that causes this issue, eclipse is very unspecific. Here is the World.h file: `/* * World.h * * Created on: 5 nov. 2013 * Author: Mo */ #ifndef WORLD_H_ #define WORLD_H_ #include "../../lib/tinyxml/tinyxml.h" #include "Layer.h" namespace World { class World { private: Layer layers[]; public: World(); virtual ~World(); TiXmlElement toXML(); }; } /* namespace World */ #endif /* WORLD_H_ */` The error occurs in the class definition. The only thing eclipse shows is: class World::World I have been googling for the last day and a half, and haven't found anything similar. In other classes, World is not seen as a type: "World" does not name a type. What have I done wrong? Help would be greatly appreciated.

    Read the article

1