I don't understand how this piece of function, work. I thought this cin.getline function is to get user input? I tried to key in the name TOM, but it turns out that only TO appeared in the cout object. Why is that so? I then triedCode:cin.getline(response,3);and I key in TOM again. This time, all the words was displayed. Why does changing 3 to 4 helped? I thought 3 is the number of characters that allowed to be shown?Code:cin.getline(response,4);



LinkBack URL
About LinkBacks


