-3
template<int max_number> class Test {
private:
// static object definition
static Test Global;
public:
// constructor
Test(int x){
int y;
y = x;
}
//static object definition inside template
Test::Global(5);
};
Test :: Global(5)にエラーがあります。テンプレートでクラスオブジェクトのインスタンスを宣言するにはどうすればよいですか?どのような署名が必要ですか?テンプレート内の静的クラスオブジェクトC++
エラーメッセージが表示されませんでした – DMaster