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

I can't do the function "putchxy" of work

I've started the course of computer science this year and even then I have never studied anything about programming, so maybe this is why i am having so many basic mistakes like this. My problem right now is with the library in C that I have to use…
0
votes
0 answers

C++ rectangle program drawing rects outside of console window

Somewhere in the following code I am missing something. My rects are being drawn outside of the console window and they all need to be within the console. This code is a hack job for a class of mine so I apologize for unnecessary or incorrect code.…
NGB
  • 41
  • 3
0
votes
1 answer

get a char that does not wait for input

I'm building a menu for a game using ncurses.h. In this part, I want a blinking text to be on screen and, only exit that loop, if the user press any key. In conio.h, I used this (was not perfect): void start() { int i; for (i = 0; i < 10;…
NeoFahrenheit
  • 347
  • 5
  • 16
0
votes
0 answers

Should I replace _outpw() function?

I have some problems when I do simulation for my Simulink program, it says _outpw() function not defined Should i try to find some other function to replace it? I have put this head source (conio.h) in the Matlab folder, but it doesn't work.
huhu
  • 131
  • 4
0
votes
0 answers

Gotoxy() in xcode

I've been looking around for a way to use the function gotoxy() in xcode. But as it is connected to the conio.h library (which is not supported in xcode) I cant get it to work. Can anybody please tell me how to get around this problem? I've googled,…
Ivti
  • 29
  • 8
0
votes
2 answers

C: conio colors to Hex code/RGB

In my application I use function textbackground() from conio library. I have 16 available colors: #define BLACK 0 #define BLUE 1 #define GREEN 2 #define CYAN 3 #define RED 4 #define MAGENTA 5 #define BROWN 6 #define LIGHTGRAY 7 #define DARKGRAY…
SigGP
  • 716
  • 1
  • 11
  • 24
0
votes
2 answers

How can I move my picture on the screen using a keypress?

I'm currently writing a program that will display a house on a screen based on the size of the house, It will also detect 'A' 'S' 'W' 'D' key presses and breaks on the key press of esc. Now that I have gotten all of these functions working, as well…
CaliBreeze
  • 13
  • 7
0
votes
2 answers

Checking if a char is pressed

The program should read 2 ints and calculate the sum or product depending on the symbol introduced from the keyboard. If you press q at any given momement, it must exit. #include "stdafx.h" #include #include using namespace…
0
votes
1 answer

Debug conio.h using gdb

I'm using Emacs and gdb to debug a c++ program that uses conio's getch. Something like the following: #include int main(){ int c = getch(); cout << (char) c; } If I place a breakpoint in the first line of the main, gdb hangs and…
Tiago Dall'Oca
  • 329
  • 3
  • 15
0
votes
2 answers

Put font color in a certain line or word using C programming

I tried the system("COLOR 0a"); but it will change all the font color to that color. I also tried the textcolor(4) it gives me an error, the error message is textcolor is undeclared but I include the conio.h. What the problem? NOTE: Im using windows…
0
votes
2 answers

How to add conio in Codeblocks?

I'm trying to build and run this code #include #include main() { textcolor(RED); cprintf("Hello, World!"); getch(); return 0; } I use code blocks - gcc compiler.As GCC doesn't support conio.h , i'm getting a lot of errors.I…
Ramisa Anjum Aditi
  • 734
  • 1
  • 6
  • 11
0
votes
0 answers

Splitting up the output of _getchar()

I want to know when an arrow key is pressed. For that I've already found _getchar(). Unfortunately, that returns several values. It returns two different and separated values, even if I save it in one integer. The first value is always 224, and the…
Caty
  • 11
  • 1
  • 2
0
votes
0 answers

C - making this program portable

The idea scanning a password entered by the user and showing ********** in place of P@$$w00r_D explaining the code inside a while loop keep scanning the characters using getch() and put them into an array password[], until the user press return The…
0x0584
  • 258
  • 1
  • 7
  • 15
0
votes
1 answer

How to delete previously printed string before printing the new string

I am using outtextxy from conio to print a string at a particular point in C.Whenever outtextxy is executed for some coordinates it works perfectly.The problem occurs whenever outtextxy is executed for same set of coordinates again but with another…
user203419
0
votes
1 answer

What is the functionality of fgetchar() ? Is it necessary to flush the standard input before using it?

In the following code (just for experiment purpose) the fgetchar() take the value present in the system buffer and thus getting terminated , Why? #include #include int main() { printf("Here getch will take the value and it will not…
Gaurav Joshi
  • 27
  • 1
  • 6