ユーザー定義の構造体struct theName
があり、これらの構造体の両端キューを作成したい ( deque<theName> theVar
)。ただし、コンパイルしようとすると、次のエラーが発生します。
In file included from main.cpp:2:
Logger.h:31: error: ISO C++ forbids declaration of ‘deque’ with no type
Logger.h:31: error: expected ‘;’ before ‘<’ token
なぜ私はこのようにすることができないのですか?
ファイル: Logger.h
#ifndef INC_LOGGER_H
#define INC_LOGGER_H
#include <deque>
#include "Motor.h"
struct MotorPoint {
double speed;
double timeOffset;
};
class Logger{
private:
Motor &motor;
Position &position;
double startTime;
(31) deque<MotorPoint> motorPlotData;
double getTimeDiff();
public:
Logger(Motor &m, Position &p);
//etc...
};
#endif