私は関連するスレッドのいくつかを読みましたが、それでも問題は明確ではありませんでした:
#include <stdio.h>
#include <vector>
#include <iostream>
template <> class stack <int>
{
public:
std :: vector <int> stackVector;
};
コンパイルエラー:
templateSpecializ.cpp:5: error: ‘stack’ is not a template
templateSpecializ.cpp:6: error: explicit specialization of non-template ‘stack’
このリンクから:coderSource.net
私はいくつかのポイントを逃しましたか?私は持っていると感じます。そこで関数を定義しようとさえしましたが、それは役に立ちませんでした。