![]() |
|
[C] How could I work on an auto-complete feature? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C] How could I work on an auto-complete feature? (/showthread.php?tid=3732453) |
How could I work on an auto-complete feature? - Terry A. Davis - Sep 3, 2013 So I was thinking of it today, my program requires user input from a list and I got a thought from Linux how you press tab it auto completes to whatever command it is closest too. My thought was something like this Code #include <iostream>Yeah shit syntax and such, but idgaf. I am just stuck how I would set up like a Linux auto-completion feature. Without criticizing me to much how would I do this or can you point me somewhere? * - g4143 - Sep 3, 2013 If your trying to implement this on a Linux console then you'll have to look at the ncurses library so that you can grab keystrokes and display output. * - Terry A. Davis - Sep 3, 2013 Nah sadly I am using crappy pdcurses for Windows for the time being. * - g4143 - Sep 3, 2013 (Sep 3, 2013 03:23 AM)Perfect Cell Wrote: Nah sadly I am using crappy pdcurses for Windows for the time being. Did you try looking at Window's conio functionality? * - Shihanus - Sep 3, 2013 The other problem is that as far as I'm aware cin is a blocking functions. You'll have to use non blocking input or multiple threads. |