hey guys,
Was just trying to start working on my new project and I got this weird error:
error C2228: left of '.name' must have class/struct/union
Below is my code, just a simple class:
#include <string>
using namespace std;
class X
{
string name;
X(string name)
{
this.name = name;
}
}
Now I know I'm a little rusty but I'm don't think I've done anything wrong. I wouldn't usually ask for help but searching "this" in google doesn't provide helpful results.


LinkBack URL
About LinkBacks
Reply With Quote
