Typed text is not displaying in console while using conio.h

47 views Asked by At

I am using conio.h in my project to display the game board. I need to read input from a user. In generally works, but it behaves like linux passwords (input is passed to a variable but not displayed in the console). I need to see the input being entered (as in the image below). The getch() method from conio.h also doesn't show input.

expected behavior

char text[16];
scanf("%s", text);
printf("text: %s", text);

sample code (only shows "a" in (5, 5), typed text is not visible)

Conio2_Init();
gotoxy(5, 5);
putch('a');
gotoxy(1, 1);
char a[16];
scanf("%s", a);

Is there a way to use conio.h and read user input explicitly?

0

There are 0 answers