I have a file with values like: START and STOP. I also have the following enum declared:
enum Type {
START,
STOP
};
I'm trying to set the enum equal to the first value in the file with something like this:
enum Type foo;
ifstream ifile;
ifile.open("input.txt");
ifile >> foo;
I'm getting the error: no match for ‘operator>>’ in ‘ifile >> foo’.
How do I go about doing this correctly?