I have struct in class and not know how to call variables from struct, please help ;)
#include
using namespace std;
class E
{
public:
Just because you declare your struct B inside class A does not mean that an instance of class A automatically has the properties of struct B as members, nor does it mean that it automatically has an instance of struct B as a member.
There is no true relation between the two classes (A and B), besides scoping.
struct A {
struct B {
int v;
};
B inner_object;
};
int
main (int argc, char *argv[]) {
A object;
object.inner_object.v = 123;
}