I am trying to combine using std :: set and a class, for example:
#include <set>
class cmdline
{
public:
cmdline();
~cmdline();
private:
set<int> flags;
};
but he does not like the flags set; part:
cmdline.hpp:14: error: ISO C++ forbids declaration of 'set' with no type
cmdline.hpp:14: error: expected ';' before '<' token
make: *** [cmdline.o] Error 1
As far as I can see, I gave the type (from int). Do you write the string "set variable" in different ways or is it not allowed there?
source
share