Inizialize object in class

Let's suppose i have this:
1
2
3
4
5
6
7
8
9
10
11
12
class A
{
 public:
 A(char*);
 }

class B
{
public:
 B();
 A aObj;
}

Where do i inizialize aObj?
Well, aObj is a member of class B. Everything that you want to put into aObj would be through B. Since aObj is public, you can modify it directly via B.aObj.
The initialisation list in B's constructor would seem a sensible place.
Topic archived. No new replies allowed.