using namespace std;
class fool
{
private:
string name;
public:
string getname(){return name;}
void setname(string n){name=n;}
};
int main()
{
fool person1;
person1.setname(m);
cout<<person1.getname();
}
please find the error ...it is probably in the main function
2) In main, you're trying to use a variable called m, but you haven't defined that variable anywhere. You should read the error messages that your compiler is giving you, because I'm sure it's already told you that.