Returns the horizontal position of the input cursor
#include <nwconio.h> WORD wherex (void);
This function returns the current column of the input cursor if successful. If an error occurs, it returns EFAILURE.
If an error occurs, errno is set to:
The wherex function returns the x coordinate of the current input cursor position (within the current screen). It also returns the output cursor’s position if cursor coupling for the current screen is enabled.
#include <stdlib.h>
#include <nwconio.h>
#include <stdio.h>
main()
{
printf("%d,%d\r\n",wherex(),wherey());
getch();
}