0
我認爲它被稱爲自反聯想,但我不太確定。特殊雙向協會
這是代碼(應該足夠多的,看看有什麼北京時間重要):
CGmae::CGame(void)
{
CFigure * figure = new CFigure(this);
}
CFigure::CFigure(CGame * game)
{
CGame * game = game;
}
我想在類中創建CGame的CFigure的對象,使CFigures知道CGame的和其他方式輪OFC。爲什麼它不適用於'這個'?我需要做些什麼來解決問題?
在此先感謝!
我
什麼是不工作?什麼是錯誤? – GazTheDestroyer
您是否收到錯誤? – Chowlett
錯字:'CGmae :: CGame'拼寫錯誤。 – Jon