特定のサイズ、255(最大)のベクトルを作成しようとしています。インターネット上の例で見られるように、それは私には機能しません...
私はMicrosoftVisualC++2012を使用しています...
私は現在のコードを持っています:
#include <iostream>
#include <string>
#include <vector>
#include <stdlib.h>
using namespace std;
const int MAX = 255;
class test
{
vector <string> Name(MAX);
};
int main()
{
system("PAUSE");
}
それは私に2つのエラーを与えます:
Error 1 error C2061: syntax error : identifier 'MAX'
2 IntelliSense: variable "MAX" is not a type name
ご協力いただきありがとうございます!