Hello Community, I'm having trouble with string manipulation in my C++ code here 👇 https://code.sololearn.com/ciZhBDhjDB1Y/?ref=app I would like to store names of students present using a loop and later print them to the console.
6/3/2017 9:29:05 PM
Tusiime Innocent Boub3 Answers
New AnswerIt is fixed now :) https://code.sololearn.com/ch4r4g6hfgFe/?ref=app 1. name should be declared as string array 2. use getline function to take input including space 3. use getchar() between int and string input. Otherwise the ENTER (followed by the int input) will be considered as the next string input.
Sololearn Inc.
535 Mission Street, Suite 1591Send us a message