Pregunta

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 :(

¿Fue útil?

Solución

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.

Otros consejos

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

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top