Can anyone tell me why i get the error "name was not declared in the scope when running this?
Thanks.
class lrn11_class{
    public:
        void setName(string x){
            name = x;
        }
        string getName(){
            return name;
        }
    private:
        string lrn11_name;
};
int main()
{
    lrn11_class lrn11_nameobject;
    lrn11_nameobject.setname("Zee");
    cout << lrn11_nameobject.getname() << endl;
return 0;
}
 
     
     
     
    