Using of endl in cin statement of c++ program | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Using of endl in cin statement of c++ program

Can we use endl in cin statement ? How to scan element one by one(means one below the other)?

16th May 2021, 7:13 AM
Anushree
Anushree - avatar
2 Answers
+ 1
16th May 2021, 8:27 AM
Anushree
Anushree - avatar
0
Anushree you can't use endl as an input ! use getline() to read whole line ;
16th May 2021, 8:22 AM
Giriraj Yalpalwar
Giriraj Yalpalwar - avatar