I have the following code:
char myText[256]; cin.getline(myText,256);
Why exactly do I need to pass an array of characters to cin.getline (), and not a string?
I read that in general it is better to use strings than arrays of characters. Should I then convert the character array to a string after receiving input using cin.getline() , if possible?
BrainPermafrost
source share