In your class B object you have
A objectA;
That is when the default constructor is being called, so in there you need to either have a designated default constructor, or you can alternatively use a default parameter, such as
A( int inputA = 0 ) { a = inputA; }
This will then take the role that set's the integer a to 0, when you call the default constructor, it really would achieve the same as
A() { a = 0; }
though
you don't have to set a if you don't want to, but since you declared a non default constructor, it no longer implicitly creates one for you. So you will need at minimum of
A(){ }
Another way you could do it is
class A {
int a;
void setSomething(int val) { a = val; }
};
class B {
A objectA;
B( A inputObjectA ) { objectA = inputObjectA; }
};
This works because you never declared any constructor, so it will implicitly create a default one for you
Lastly, this is one other way you could do it, probably closest to your original code with only 3 characters added, should fix everything:
class A {
int a;
A( int inputA ) { a = inputA; }
};
class B {
A objectA(0);
B( A inputObjectA ) { objectA = inputObjectA; }
};