i got a compile error which i do not understand. i have a h/cpp file combination that does not contain a class but just defines some utility functions. when i try to use a struct that is defined in another class i get the error:
C2027错误:使用未定义的B类:C
因此,被 stripped弄到问题,藏书认为情况如此。
namespace A {
void foo(B::C::SStruct const & Var);
}
标准结构的定义属于另一卷,当然包括。
namespace B {
class C {
public:
struct SStruct { };
};
}
the strange thing is, i can use this struct in other classes fine, it just seems to be related to this one h-file which contains just utility functions. what am i missing here? thanks!