This has to be a bug (the error in the title), but does anyone know how to fix it or just get around it?
Here is the code (I also have two other files which are having the same problem):
#include <iostream>
#include <string>
class Person
{
public:
Person(): name(""), dob(""), gender("") { }
Person(string n, string d, string g): name(n), dob(d), gender(g) { }
virtual void print() { cout << name << " " << dob << endl; }
protected:
string name;
string dob;
string gender;
};
Every instance of "string" in the code above receives the "unable to resolve identifier string" error.
It also is not able to resolve the identifier "cout" and "endl." Again, does anyone know a workaround or some kind of fix? Any help is appreciated, thanks.