Quote Originally Posted by AeriaAVA View Post
Snippet Name : AeriaAVA
Key Words : CIN , COUT xD
Code:
#include <iostream>
#include <string>
using namespace std;

class MPGH{
public:
    string y;
    void Name(string y){
    myname = y;
    }
    string Set(){
        return myname;
    }
private:
    string myname;
};

int main()
{
MPGH Ahmed;
Ahmed.Name("AeriaAVA");
cout << Ahmed.Set() << endl;
system("PAUSE");
return 0;
}
it'd be better if you used get and set functions. Also, why is the set function getting ?