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.
テンプレートを使用してノード構造体を作成しました。
template <typename T> struct Node{ T data; Node* next; Node* prev; };
正常にコンパイルされますが、クラス内で使用しようとすると、エラーが発生します: 引数リストなしのテンプレート名 'ノード' の無効な使用
別のクラスのコンテキストでは、プレーンを使用する代わりにテンプレート パラメーターを追加する必要がありますNode*。
Node*
struct B { Node<int>* next; };