c++ - error: Class has not been declared despite header inclusion, and the code compiling fine elsewhere -
so have class included in class keeps throwing compile error of form "error: 'problemclass' has not been declared. files set thusly:
#ifndef problemclass_h #define problemclass_h #include <iostream> #include <cmath> class problemclass { public: virtual void init() = 0; }; #endif
and class error occurs looks this:
#ifndef aclass_h #define aclass_h #include "problemclass.h" class aclass : public base { public: void dosomething(problemclass* problem); }; #endif
the compile error occurs @ void dosomething();
i'm aware code here isn't enough solve problem. i've been unable create minimal example can reproduce it. question more general; sort of things might cause this? there in particular should for, or line of enquiry should following track down?
this code compiles fine in identical version of project.
help of sort appreciated, no matter how vague. i'm using codeblocks 10.05 mingw4.4.1 in win 7 64 bit.
you seem saying code showing doesn't produce compiler error having problem with. can guess. here possibilities:
Comments
Post a Comment