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

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

c++ - Clear the memory after returning a vector in a function -

erlang - Saving a digraph to mnesia is hindered because of its side-effects -