Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
だから、私は次のようなものが欲しい:
class A{ B member; }; class B{ A function(); };
それらを宣言する順序に関係なく、不完全な型エラーが発生します(その理由はほとんど理解しています)。どうすればこれを解決できますか? ポインターを使用したり、関数を B クラスの外で定義したりしたくありません。また、前に宣言する
class A; class B;
どちらも機能しないようです。