GorillaApe
GorillaApe

Reputation: 3641

C read from Console limit char input.How to do it?

I am trying to build my first Windows TUI Console app and i am facing some problems...
Scanf nor fgets prevents user from entering unlimted characters unless hits enter etc..
In a TUI interface thats a problem.. because it can get overwrite the line below...
Is there any solution for this apart from getch

Upvotes: 0

Views: 280

Answers (1)

user2100815
user2100815

Reputation:

No, there isn't, at least not portably. C input is stream based, and doesn't have a concept of a keyboard. If you really want to write a text user interface, use ncurses or pdcurses.

Upvotes: 3

Related Questions