c++ - Any way to use class typedef but not include that class's header file? -
say have such header file (foo.h):
class foo { public: typedef int tag; // other stuff } as far know, if want use foo::tag in other headers, must #include "foo.h". there way avoid including foo.h file?
p.s. don't want move typedef out of class's scope.
no.
if want use foo::tag not type same name/type, have include header file.
Comments
Post a Comment