Questions tagged [conio]

A non-standard C library that enables users to move the cursor on Terminals and place characters at certain locations.

The conio library is a C library mostly provided by MS-DOS compilers to provide console input/output beyond what is provided by the C standard library.

Conio does not form part of the C standard library or ISO C, nor is it defined by POSIX. This means that the functions in the conio library vary somewhat between compilers.

111 questions
0
votes
0 answers

Searching strings in a file and comparing it to a variable entered using C

I want to enter a name into a program and that name will act as a keyword for a file. The program will search the file for that name and display all other information related to it. Below is a snippet of the…
0
votes
4 answers

Is there a way to replace the kbhit() and getch() functions in Standard C?

I'm trying to get a quick time event type of interaction with the console and I managed to obtain it using the conio library. Sadly the project I'm working on requires the code to be compilable on both Windows and Linux and I can't figure out a way…
user3481786
  • 1
  • 1
  • 1
0
votes
1 answer

Issues with repeated key checking with getch()

I am having issues with repeating key checking using a function that utilizes getch(). Here is a code example: static char g_keybuffer[256]; _Bool IsKeyDown(char c) { char ch; if(kbhit()) ch = getch(); if(ch == -32 || ch ==…
NAME__
  • 625
  • 1
  • 7
  • 17
0
votes
2 answers

How to compile c code with conio.h,dos.h,io.h header files in codeblock,Windows (beginner)?

I've started practicing C programming recently and I've searched online for some codes so I can see how they work.I found one with these 3 header files (conio.h,dos.h,io.h) included. I use Codeblocks 12.11 on Windows 8.0 .I am a beginner not only in…
Theo
  • 1
  • 1
  • 1
0
votes
1 answer

Why can't I read all Ctrl + 'letters'

I've made a program that allows me to read all the stand-alone function keys (that I thought to test, at least) on my keyboard. I have it designed so that I can refer to any single key input as a single value. It handles Return, F1-F12, delete,…
Josh C
  • 1,035
  • 2
  • 14
  • 27
0
votes
1 answer

how do I get the library curses.h?

I'm trying to compile a project someone wrote in visual C on my Netbeans+cygwin, and there are a lot of libraries I don't have. One of the problems is conio.h, and it seems like I can use curses.h. How do I get curses library?
sam
  • 57
  • 1
  • 10
0
votes
4 answers

Pre processor directive conio.h c++

As in C++ header files are used without .h extension like instead of but its not same in case of . Why we can't use
0
votes
2 answers

kbhit() with double loop not working well

Just for fun, I tried printing kbhit() with loops, so that the program after a key press prints the line infinitely until pressed keyboard again. It compiles well and when run, just gives blank screen. No prints. But upon single keypress ends the…
user2178841
  • 849
  • 2
  • 13
  • 26
0
votes
3 answers

how to detect arrow keys

I have created an application for detect pressing up and down key on keyboard but nothing will be printed after pressing these keys. I am using Visual C++ 2010 #include #include using namespace std; void main() …
Arashdn
  • 691
  • 3
  • 11
  • 25
0
votes
3 answers

Java using classes from jar

This must be a super overasked question. Although here goes: I have a java file for testing around (hworld.java) and am trying to import conio.jar, a JAR which is a wrapper of Conio. The JAR contains only one class file (conio.class) and META-INF.…
Name McChange
  • 2,750
  • 5
  • 27
  • 46
-1
votes
1 answer

Editable Console Output

Here is a portion of some code I am trying to write: //Choice Based Menu #include #include int main() { char choice; cout<<"Menu"<
Siddharth
  • 1,146
  • 3
  • 15
  • 28
-1
votes
1 answer

Can i have the compiler ignore OS-Specific methods

I have a simple little console game which heavily relies on user input to move around a game board. Originally, we were implementing standard input and dealing with having to press enter for each move; However, we are now looking into platform…
Bryce Hahn
  • 63
  • 1
  • 11
-1
votes
2 answers

How can I move an printf indicator("==>") on a printf menu("option 1\n option 2\n option 3")?

I'm using arrow keys as inputs to move a printf arrow ("==>") up and down a printf menu. I'm using a function that counts where the arrow should be and using switch cases and printf("\n==>") to place where the arrow should be, but it prints the menu…
-1
votes
3 answers

What do I need to change to make this C programm work on Linux?

I need to make this work Linux, I know that conio.h is not for Linux and the main problem is getch() function. I tried using another lib like curses.h but still I got a lot of errors. It takes users input of password and converts it to **** for…
user3350179
-1
votes
1 answer

Use of Gotoxy(int x,int y)

I am new to C. What is the use of the gotoxy function? I read it can be used only in a console.What does that mean? Can someone give me an example where it is been used in a legit way?
user128949
  • 19
  • 1
  • 4