Reputation: 11295
How to use
SetConsoleCursorPosition (GetStdHandle(STD_OUTPUT_HANDLE), c)
function when I have not 1 "c" arguments but 2 for example 2 3?
Maybe someone know better function than SetConsoleCursorPosition, gotoxy() does not work in Visual Studio :(
Upvotes: 1
Views: 11032
Reputation: 2395
You can implement it like this:
COORD cord;
cord.X=10;
cord.Y=10;
SetConsoleCursorPosition(GetStdHandle( STD_OUTPUT_HANDLE ),cord);
cout<<"*";
This will print "*" at screen coordinates (x,y)=(10,10)
For theoretical and basic knowledge about Method, see http://msdn.microsoft.com/es-es/library/windows/desktop/ms686025%28v=vs.85%29.aspx
Upvotes: 1
Reputation: 3934
As you can see here: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682119%28v=vs.85%29.aspx
CORD is a struct and contains two values, the x value and the y value.
Upvotes: 1