Link to home
Start Free TrialLog in
Avatar of Cliff_Heath
Cliff_Heath

asked on

SetConsoleCursorPosition

I'm trying to change the location of where my output is displayed.
Here's the code.

HANDLE StdOut = GetStdHandle(STD_OUTPUT_HANDLE);

COORD myCoord;

cout << "Hi";
myCoord.X =+ 20;
SetConsoleCursorPosition(StdOut, myCoord);
cout << "Bye";

The final display is HiBye. Why doesn't isn't the position changed?

Oh yeah I don't want to solve it with  cout << "                                   Bye";

Thank you.

ASKER CERTIFIED SOLUTION
Avatar of efn
efn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tinchos
tinchos

No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: efn {http:#9245895}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Tinchos
EE Cleanup Volunteer