C ++はかなり新しいので、アプリケーションでベクトルを使用しようとしています。使ってます
#include <vector>
ヘッダーファイルにありますが、コンパイルすると次の行で失敗します。
std::vector<Shot> shot_list;
エラーE2316「ベクトル」は「std」のメンバーではないことに注意してください
次にstd::を削除すると、Undefinedsymbol'vector'コンパイラエラーメッセージが表示されます。これで本当に途方に暮れています。使用に問題はありませんでした
std::list<Shot> shot_list;
ベクトルを使用する前に。
これは、コマイルに失敗した簡単な例です。
//---------------------------------------------------------------------------
#ifndef testclassH
#define testclassH
//---------------------------------------------------------------------------
#include <vector>
class TestClass {
private:
std::vector<int> testVect(1); // removing std:: and adding using namespace std; below the include for the vector it still fails to compile;
};
#endif
私には、これとこの例の間に違いは見られません