A.cpp
#include <iostream>
#include "A.h"
#include "B.h"
using namespace std;
void A::Const{
cout << "コンストラクター起動!" << endl;
b = new B();
delete b;
}
int main(void){
A* a;
a.Const
return 0;
}
#include <iostream>
#include "C.h"
#include "B.h"
#include "A.h"
using namespace std;
B::B(){
cout << "違うクラスのコンストラクター" << endl;
a->c = new C();//ここで左辺値ウンタラカンタラが出る。
}
#include <iostream>
#include "C.h"
using namespace std;
C::C(){
cout << "第三のコンストラクター。" << endl;
}