#ifndef IMAGEDATA_H
#define IMAGEDATA_H
#include <iostream>
#include <vector>
class ImageData {
public:
std::string foo;
std::string bar;
private:
};
#endif
I have this class definition and I have another class which has one of this class as follows:
#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
when i make the file, I get this error:
In file included from UserImageCollection.cc:1:
../../include/producer/UserImageCollection.h:12: error: expected `;' before '<' token
gmake: *** [UserImageCollection.o] Error 1
in my UserImageCollection.cc file there is only 1 line right now.
When i comment out
std::string vector<ImageData> imageData;
it compiles but i need it, how can i get it running?
imageDatacannot be both astd::stringandstd::vector<ImageData>.It must be:
or: