次のファイルをコンパイルすると、エラーが発生します。
ECArgs.h:36:3: error: ‘string’ does not name a type
ECArgs.h:36:ECString value(char c);
誰かが私にエラーのヒントを教えてもらえますか?
ECArgs.h
#include <list>
#include "ECString.h"
class ECArgs
{
public:
ECArgs(int argc, char *argv[]);
int nargs() { return nargs_; }
bool isset(char c);
ECString value(char c);
ECString arg(int n) { return argList[n]; }
private:
int nargs_;
int nopts_;
ECString argList[32];
list<ECString> optList;
};
ECString.h
#define ECS gnu
#if ECS == gnu
#include <cstring>
#define ECString string
using namespace std;
#else
#include <bstring.h>
#define ECString string
#endif