Suppose I define a class Foothat does not implement the default constructor. In addition, I have a class Barthat owns an instance Foo:
class Foo() {
  private:
    int m_member;
  public:
    Foo( int value ) : m_member(value) { }
};
class Bar() {
  private:
    Foo m_foo;
  public:
    Bar(  ) {
      int something;
      
      
    }
};
The code, as shown, will not work because it is Bartrying to call the default constructor Foo.
Now I'm trying to make the constructor Barfirst define something, and then pass the result to the constructor Foo.
- Bar / Foo m_something. , , m_foo -.
Foo , , Foo ( ).
? /?