I thought they, as for general member functions can be defined either inside the class as an inline or in a .cpp file. But I'm totally confused by the following error I'm getting.
What works:
What doesn't work :Code:#ifndef KEYWORD #define KEYWORD #include "token.h" class Keyword : public token { public: Keyword(std::string input):token(input){/*....*/}; }; #endif
.h
.cppCode:#ifndef KEYWORD #define KEYWORD #include "token.h" class Keyword : public token { public: Keyword(std::string input):token(input); }; #endif
Error:Code:#include "Keyword.h" Keyword::Keyword(std::string input):token(input) { }
What am I missing ?Originally Posted by g++-4.6



LinkBack URL
About LinkBacks



