Umm, I have tried writing a simple class that returns a person's name, but I am not exactly sure why it doesn't work. I have tried fiddling with it for about 20 mins but I'm going no where, please help.

#include <iostream.h>

class name
{
public:
char getname(){return itsname};
void setname(name){itsname = name};
private:
char itsname[50];
};

int main()
{
name name;
char name [50];
cout << "\nWhat is your name?";
cin >> name;
cout << name.getname;
return 0;
}