Program skips cin.getline()
问题 I have made this program, It get the users adress, name and work. Then It puts it all into one string and outputs that string. (I know there are better ways to do this) char str[600]; char adrs[200]; char name[10]; char wrk[200]; cout<<"Enter your name and press ENTER: "; cin.getline(name,10); cout<<"\nEnter your adress and press ENTER:"; cin.getline(adrs,200); cout<<"\nEnter your workplace and press ENTER:"; cin.getline(wrk,200); strcpy(str,"My name is "); strcat(str,name); strcat(str,"\nand