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
1 answer

Cannot get _kbhit to work anymore on windows, issue with conio

Compiling Microsoft's sample program in C for using _kbhit thows me this error: fatal error: conio.h: No such file or directory I use Code::Blocks and GNU GCC compiler, and Windows 10. The weird thing about that is, that this code worked 2 months…
0
votes
0 answers

.exe files dissapear when they want in VS code

Things that i should note are that I am using the latest version of vs code to write in c, my compiler is mingw-w64. Whenever I run a simple code (Hello world for example) everything works then suddendly when I try to do something else a message…
0
votes
4 answers

Breaking out of a loop with a keypress

I am writing a Win32 GUI app which has a loop which I would like to restart only when a keypress is made. The main loop is already running, and I can't simply restart it, so I have to insert a 'hang' point which the user can manually break out of.…
CaptainProg
  • 5,610
  • 23
  • 71
  • 116
0
votes
1 answer

How to label different f key pressings in conio.h?

#include #include int main() { int ch = getch(); // printf ("%d" , ch); switch (ch){ case 13: printf("ENTER"); break; case 224: printf("LEFT ARROW"); …
Geliebten
  • 9
  • 3
0
votes
1 answer

How to Read a Esc key stroke with other keys in If-Else statement

I've tried everything i know to get it work right but i don't know how to make this program to get terminated when escape key get pressed any help i know i can use getch or getchar to get the key stroke of esc key but i also want it to be working…
0
votes
0 answers

Need to figure out conio.h for a book program, which Idk how to

I'm writing a book program that enables the user to Add and Find books to a library. Now, I need to figure out how to receive keyboard input from the user using conio.h/any other alternative. So that if the user presses '1', the AddMenu() gets…
0
votes
3 answers

I can't understand the increment portions of for loops in c language for specific problem

#include #include int main(void) { char ch; for(ch=getche(); ch!='q'; ch=getche()); printf("Found the q"); return 0; } I can't understand how the for loop here works . I can understand the initialization and the…
0
votes
1 answer

whats the difference between _kbhit and kbhit in C?

I know kbhit "Determines if a keyboard key was pressed" but I see that people use both _kbhit and kbhit interchangeably.
joshua
  • 458
  • 5
  • 18
0
votes
1 answer

Can I include a headerfile in a namespace?

I am using the header file, and somewhere else in my source code I define a function with the name getch and it has to have that name. Since there already is a getch in , and this header file declares all of its functions in the…
Amirreza A.
  • 736
  • 4
  • 10
0
votes
3 answers

C++ Changing Text Color

I'm trying to change the color of the text in c++, the only answer I can find is for C and not C++. I have tried using conio.h but don't understand how to use it. Could anyone help with this?
0
votes
2 answers

Creating a password for a console application in c++

I am trying to make a simple program as an application for what I learned, I am trying to make a program that takes a password from the user and for each character the user puts, there is an '*' is shown in the console and when he press enter key…
0
votes
1 answer

Where can I download the CONIO.H clone library/source code for Visual C++ 2008 and Win32?

I need to convert a Turbo C++3.0 based DOS program into Win32 and VC++2008. It has a text-based GUI interface. Where can I download the CONIO.H clone library/source code for Visual C++ 2008 and Win32?
user366312
  • 16,949
  • 65
  • 235
  • 452
0
votes
1 answer

Using _getch() in a for loop

I'm trying to make a binary to decimal converter and I wanted to use _getch() so the user doesn't have to press enter every number he enters, but… #include #include int main() { int intnum[8], i = 0, ris; char charnum; …
Danilo
  • 23
  • 5
0
votes
1 answer

C++ Mac | Conio alternative

I've just learnt C++ in the last few months and want to start making some CLI games, like the old school Snake, Frogger, Pong, etc... I've found some sources where people use the conio header. I've researched and have found this isn't compatible…
Dan
  • 315
  • 2
  • 13
0
votes
1 answer

Using the gotoxy() function to center X coordinate

I want to write something using printf while also centering the x coordinate and y=0. How can I center the x coordinate? For example someone might have their compiler window open in fullscreen and others might not? I want the text in the middle.…
alcatraz
  • 41
  • 2
  • 6