Lowest price ever! Learn Generative AI for 48% less!
Get my discount0
if i want to scan string c++ what should I do?? suppose hello world
3 Answers
+ 1
If the string contains spaces, use getline(cin, stringName)
0
If you want to read strind from console input then try to use command "cin >> str_var"
0
cin>>" ";