<s>[INST] It is known to me that virtual inheritance is one method, which typically share a base class amongst their children.

It is true that if multiple independent headers include the same base class as a virtual base class then this will result in only one instantiation of that class in the memory at run time when the child class object is instantiated. But my problem here is that I am stuck and need concrete advice.

Here is the code:

```cpp
//header.h
class A {
 public:
  A(){}
  virtual ~A() {}
};

class B : public virtual A {
 public:
  B() {}
  ~B() {}
};

class C : public virtual A {
 public:
  C(){}
  ~C() {}
};

class D : public B, public C {
 public:
  D(){}
  ~D() {}
};
```

I have a total of five classes A, B, C, D. The class A is a base class for B and C, B and C are basically virtual base classes and they both are base classes of Class D. As I read somewhere on stack overflow that since B & C is derived virtually from A, each object of class D will have have their own sub object of B and C but each will share the same A which is good as by default had B & C derived non virtually from A there would be multiple instantiation of class A for each of the B sub object. But here's the thing:
 
- Can you suggest some concrete steps of how you might go about solving this problem when you need to confirm or view which all classes in the C++ object model has resulted into instantiation of multiple copies in the memory?[/INST]