0

What are other input functions than cin?

I am making a program, where I take user input. Sadly, I need something like fgets() in C. Is there something like it?

13th Dec 2020, 10:16 AM
OverdrivedProgrammer
3 Answers
+ 3
#include <string> ..then.. string word; getline(cin, word); ..or...if it's a c-style string then.. char name[100]; cin.getline(name, 100);
13th Dec 2020, 10:28 AM
rodwynnejones
rodwynnejones - avatar
+ 1
What the bloody hell. Why didn't they tell me that... NOPE, just a barrage of errors
13th Dec 2020, 3:20 PM
OverdrivedProgrammer
0
I am using fgets() right now, but it just doesn't ask for input. https://code.sololearn.com/c1A15A24A17a/?ref=app
28th Dec 2020, 10:28 PM
OverdrivedProgrammer