string issues in header

Hello,
I am new to C++. Currently I am writing a header file for my class. However, I keep getting errors relating to string. Here is my code.

1
2
3
4
5
#include <string>
class SimpleSyntax{
public:
	SimpleSyntax(string myCode);
};


the error is
error C2061: syntax error : identifier 'string'

thanks in advance :D
Last edited on
you're missing std namespace.
either replace string with std::string or add using namespace std.
Topic archived. No new replies allowed.