cout<<"Please enter your name:";
cin>>user.name;
int i=0;
char name[i];
while (name[i])
{
if (isalpha(name[i])) cout<<"Valid",name[i];
else cout<< "Invalid name entry",name[i];
i++;
}


i want the user enter only alphabet and not number... wat code should i use? above code not working