Hello. let's say I have the following class:
Now let's say I also have the following class:Code:class A { public: A(int x) :x(x) {} private: int x; };
How do I fix that call to A's constructor without changing a to a pointer or something?Code:class B { public: B(); private: A a; }; B::B() { a.A(5); // invalid }