私はそのようなことをしようとしています:
//stack.h
#ifndef STACK_H_INCLUDED
#define STACK_H_INCLUDED
#include <vector>
struct CharStack {
int sp;
std::vector<char> data(87);
} S;
しかし、次のようなエラーが発生します。
error: expected identifier before numeric constant
error: expected ',' or '...' before numeric constant
なぜそれが起こるのですか?動的な長さのベクトルを作成したい場合は問題なさそうです