#ifndef IMAGEDATA_H
#define IMAGEDATA_H
#include <iostream>
#include <vector>
class ImageData {
public:
std::string foo;
std::string bar;
private:
};
#endif
У меня есть это определение класса, и у меня есть другой класс, который имеет один из следующих классов:
#ifndef UserImageCollection_H
#define UserImageCollection_H
#include <iostream>
#include <vector>
#include "ImageData.h"
class UserImageCollection
{
public:
std::string uid;
std::string guid;
std::string data;
std::string vector<ImageData> imageData;
private:
};
#endif
, когда я создаю файл, я получаю эту ошибку:
In file included from UserImageCollection.cc:1:
../../include/producer/UserImageCollection.h:12: error: expected `;' before '<' token
gmake: *** [UserImageCollection.o] Error 1
в моем файле UserImageCollection.cc сейчас только 1 строка.
Когда я закомментирую
std::string vector<ImageData> imageData;
, он компилируется, но мне это нужно, как я могу его запустить?