Home > Back-end >  Cin. Getline ()
Cin. Getline ()

Time:09-24

Want to know the cin. Getline () & gt;> A computer what to do with it?

CodePudding user response:

Will enter a whole line, the blank space and,

CodePudding user response:

Although don't know what's your side of the compiler, but here in cin VS2017 getline require parameters, there are two function prototypes:
Getline (char * _Str, STD: : steamsize_Count);
Getline (char * _Str, STD: : steamsize_Count, char _Delim);
Just the cin. Getline () usage can't use,
And if the code is:
Char a, [255].
Cin. Getline (255). A, & gt;> a;
cout Then he will first perform getline let you input a string in, after completed the task of getline, perform the back & gt;> A let you enter a string
Finally, through the cout output a, we can know the value of a is behind this & gt;> The entered a string,

So, for "computer is how to deal with it?" This question, my answer is: an error,
  • Related