c++ - Cause of unknown type name and undeclared identifier errors? -
i have header file that's linked others in project of mine. here code in file that's giving me error:
#ifndef relation_h_ #define relation_h_ #include <set> #include <string> #include "scheme.h" #include "tuple.h" class relation { public: void select(); void project(); void rename(); private: std:string name; scheme scheme; std::set<tuple> tuples; }; #endif /* relation_h_ */
when compile, error follows:
./relation.h:25:2: error: unknown type name 'std' std:string name; ^ ./relation.h:25:6: error: use of undeclared identifier 'string' std:string name;
i have checked circular dependencies (the 2 files included here have no other files included in them) , can see <string>
class included. no errors occur std::set
. might causing problem?
update: measure, isolated file , 5 associated (the .cpp , 2 pairs included) , compiled. got same error.
Comments
Post a Comment