> strcyp (input1, default1);
Does this compile?
Isn't it supposed to be strcpy() ?
Sorry about this one. I had to retype the code on another computer to put it online; so no.. it probably wouldn't compile. Additionally, on line 14, a correction would have to be made to cause the program to go into that while loop.
It would be changed from:
while ((success != 0) && (tries < 4))
to
while ((success == 0) && (tries < 4))
> the program will ignore (or seem to ignore) all of my "cin.ignore(1000, '\n');" and
> "cin.getline(input1, 31, '\n');" commands.
Or they could be returning error.
Check the return result to see if this is the case.
I checked the value of input1 by adding the following code after the if-statement that starts on line 30.
cout << "input1 =" << input1 << "!" << endl;
I experimented with different input and arrow key combinations, and came to some realizations.
1. I started with the standard input that I used for all of the debugging:
Guybrush Threepwood T2345
2. When I used any left-right combination that started with the
left arrow, the output always came out the same (regardless of whether or not I replaced characters.):
input1 =Guybrush Threepwood T234ome text here...
Some more text here...
3. When I used any left-right combination that started with the
right arrow, I got:
input1 =Guybrush Threepwood T2345 ome text here...
Some more text here...
I didn't bother with the up or down arrows because it made things way more complicated.
I'm sorry that this this getting more complicated, but I thank you for your patience and responses.