What is considered the best practice for handling this situation?
class A {
private:
std::vector<B> derp;
public:
struct B { ... };
void foo(B b);
}
(The problem is that this code would say "error: use of undeclared identifier 'B'" I think I could solve the problem by doing something like
class A {
public:
struct B { ... };
void foo(B b);
private:
std::vector<B> derp;
}
But that seems strange and not like the proper solution. Also as a side note, if I were to write that should I write it like this?
struct A {
struct B { ... };
void foo(B b);
private:
std::vector<B> derp;
}
Bor should it be something only accessible to yourA?