about member class object

if there is a class object which is a member of another class
i.e
1
2
3
4
5
6
7
8
9
10
11
12

class in
{.....};

class out
{
  private:
        in in_example;
        .....        

};


when the out class constructor is called
will the in class constructor be called or not?
Yes.
Moreover, you can specify which constructor will be called with an initializer list.
Last edited on
Topic archived. No new replies allowed.