I'm trying to declare a new obj and call the constructor of class B, all inside of class A.
I get two errors......
error: expected identifier before numeric constant
and
error: expected ‘,’ or ‘...’ before numeric constant
class A {
public:
class B {
private:
int num;
public:
B(int in)
{
num = in;
}
};
B obj(7); // here is the problem
};
It seems like this line B obj(7);
is giving me the errors.