Can anyone offer any explanation on this please
im trying to accept user input from keyb and ultimatly store it in a string
ive tried both
string sNewName;
getline(cin, sNewName);
and
char cNewName[25];
string sNewName;
cin.getline(cNewName, 25); // also tried "sizeof cNewName" in place of 25
sNewName = cNewName;
in both instances, the program just skips the input and continues to the next block of code
when all the input is being written to file it is just a null input being recorded.
thanks in advance for any help
I can't be bothered to have a sig!
im trying to accept user input from keyb and ultimatly store it in a string
ive tried both
string sNewName;
getline(cin, sNewName);
and
char cNewName[25];
string sNewName;
cin.getline(cNewName, 25); // also tried "sizeof cNewName" in place of 25
sNewName = cNewName;
in both instances, the program just skips the input and continues to the next block of code
when all the input is being written to file it is just a null input being recorded.
thanks in advance for any help
I can't be bothered to have a sig!