struct golf
{
char fullname[40];
int handicap;
}
int setgolf(golf & g)
{
cout << "Enter the name: ";
cin.getline(g.fullname, Len);
if (g.fullname == '\0')
{
return 0;
}
cout << "Enter the grade of " << g.fullname << " : ";
while (!(cin >> g.handicap))
{
cin.clear();
while (cin.get() != '\n')
continue;
cout << "Please enter an integer: ";
}
while (cin.get() != '\n')
continue;
return 1;
}
onemoo