On one of my computers, the
cout
statement's plain text output is fine, but on a second computer the text contains weird looking characters at the beginning of some of the lines. First, here's the
cout
statement:
1 2 3 4 5 6 7 8 9 10
|
cout << "\n\nAnimal Move Type: Position Change" << endl
<< "------ ---------- ---------------" << endl
<< "Tortoise \"Fast Plod\": ahead 3 squares." << endl
<< "Tortoise \"Slip\": back 6 squares." << endl
<< "Tortoise \"Slow Plod\": ahead 1 square." << endl
<< "Hare \"Sleep\": no change." << endl
<< "Hare \"Big Hop\": ahead 9 squares." << endl
<< "Hare \"Big Slip\": back 12 squares." << endl
<< "Hare \"Small Hop\": ahead 1 square." << endl
<< "Hare \"Small Slip\": back 2 squares.\n" << endl;
|
Then, the okay-looking text ...
Animal Move Type: Position Change
------ ---------- ---------------
Tortoise "Fast Plod": ahead 3 squares.
Tortoise "Slip": back 6 squares.
Tortoise "Slow Plod": ahead 1 square.
Hare "Sleep": no change.
Hare "Big Hop": ahead 9 squares.
Hare "Big Slip": back 12 squares.
Hare "Small Hop": ahead 1 square.
Hare "Small Slip": back 2 squares.
|
Lastly, the garbled-looking text ...
Animal Move Type: Position Change
ü------ ---------- ---------------
ëTortoise "Fast Plod": ahead 3 squares.
¦Tortoise "Slip": back 6 squares.
¦Tortoise "Slow Plod": ahead 1 square.
íHare "Sleep": no change.
¬Hare "Big Hop": ahead 9 squares.
-Hare "Big Slip": back 12 squares.
+Hare "Small Hop": ahead 1 square.
-Hare "Small Slip": back 2 squares.
|
I'm running the same .exe with the same VS 2010 C++
cout
statement in both cases. The only difference is that on one computer (that displays the output okay) it is a 64-bit Gateway desktop running Windows 7 Ultimate. And the other (with the funny looking output) it's a 32-bit Dell desktop, but also running Windows 7 Ultimate.
Anyway, anyone have any ideas?
P.S. If the problem was limited to a few garbled characters, I would not mind THAT so much, but in addition, the program terminates because extraneous characters are being sent to cin.