c++ - Expected class-name before '{' token -
when trying compile project header file (bobjr) code::blocks gives me error expected class-name before '{' token. wrong code?
#ifndef bobjr_h #define bobjr_h class bobjr: public bob { public: bobjr(); }; #endif // bobjr_h this bobjr cpp:
#include "bobjr.h" #include "bob.h" #include <iostream> bobjr::bobjr() { //ctor }
you're missing definition bob. either need in same header of need #include header declares bob before declaring bobjr
Comments
Post a Comment