Hello, everyone. I've got a compiler error popping up for this class:

#include <iostream>
#include <string>

class Stage
	string var;
	Stage(int num_of_items);

The error is:

error C2146: syntax error : missing ';' before identifier 'var'

The funny thing is that if I remove the line "string var", it works fine. Any ideas?

It could be that string is defined in namespace std, which you forgot to declare that you are using.

Either that or declare-- using std::string or-- std::string var;

commented: Seems like a good idea to me. +18