how to get a string input from user using c++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to get a string input from user using c++

getting data from user

15th Jan 2019, 11:37 AM
Andrew
Andrew - avatar
1 Answer
+ 3
Either: char var[size]; std::cin >> var; cin.ignore(); or, std::string var; getline(std::cin, var);
15th Jan 2019, 12:20 PM
Dread
Dread - avatar