Kuinka saan asetettua kursotin tiettyyn kohtaan? gotoxy(x, y) ei toimi.
Tarkoittanet hiiren kursoria?
Luulenpa, että ks. operaatio ei konsoliohjelmissa onnistu, vaan sinun on käytettävä WinAPI:a "kunnon" windows-ohjelmassa (vai toimiiko WinAPI konsoliohjelmissa?)
MSDN kirjoitti:
SetConsoleCursorPosition
The SetConsoleCursorPosition function sets the cursor position in the specified console screen buffer.
BOOL SetConsoleCursorPosition( HANDLE hConsoleOutput, COORD dwCursorPosition );Parameters
hConsoleOutput
[in] Handle to a console screen buffer. The handle must have the GENERIC_READ access right. For more information, see Console Buffer Security and Access Rights.
dwCursorPosition
[in] A COORD structure that specifies the new cursor position. The coordinates are the column and row of a screen buffer character cell. The coordinates must be within the boundaries of the console screen buffer.
Return Values
If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
The cursor position determines where characters written by the WriteFile or WriteConsole function, or echoed by the ReadFile or ReadConsole function, are displayed. To determine the current position of the cursor, use the GetConsoleScreenBufferInfo function.If the new cursor position is not within the boundaries of the console screen buffer's window, the window origin changes to make the cursor visible.
Example Code
For an example, see Using the High-Level Input and Output Functions.Requirements
Client: Included in Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, and Windows 95.
Server: Included in Windows Server 2003, Windows 2000 Server, and Windows NT Server.
Header: Declared in Wincon.h; include Windows.h.
Library: Use Kernel32.lib.See Also
Character-Mode Applications Overview, Console Functions, GetConsoleCursorInfo, GetConsoleScreenBufferInfo, ReadConsole, ReadFile, SetConsoleCursorInfo, WriteConsole, WriteFile
Heikki: Win32 konsoliohjelmat ovat ihan normaaleja sovelluksia ja voivat käyttää ihan samoja funktioita kuin "kunnon ohjelmatkin". Ja tosiaan, MSDN auttaa.
Aihe on jo aika vanha, joten et voi enää vastata siihen.