here is one of the function definition in my c++ program...
Unfortunately, it doesn't work...(It compile but it won't let me to enter the name.)
void ListMemberName(Member arr, int length1)
//Purpose: List member by name
//Pass by Value: length1
//Pass by Reference: arr
int found = 0;
cout<<"Enter name of the member"<<endl;
if (strcmp(target, arr[ctr].name)==0)
cout<<arr[ctr].num<<' '<<arr[ctr].gend<<' '<<arr[ctr].name<<endl;
I'm pretty sure it is the line "cin.getline(target,30,'\n');" that cause the problem.
Since it required to enter a full name(have space), therefore i use cin.getline instead of cin>>.