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

Python - Printing unicode to console window with WConio

I'm writing a terminal game in python. It has a map loader function, normally it works fine when I use regular characters in the map. (abcdefg) but when I use something like █, and save the map as 'ansi', it renders it as a half solid. When I change…
SuperDisk
  • 109
  • 8
2
votes
1 answer

Printing in windows console on x,y position

I want to print, in a certain (X,Y) position, on a standard console in windows. I tried to use conio.h, but is deprecated/non-existing. There was the gotoxy(x,y) method that seems to be what I want. I've tried these ways, but it just prints extra…
CMCB
  • 61
  • 2
  • 13
2
votes
3 answers

How to port code using Windows conio.h to Linux?

I wrote this C program for Win32/c compiler but while i'm trying run this using gcc in Linux machine or codepad.org it shows 'conio.h: No such file or directory compilation terminated' What are modification to be done to execute this program…
Vilva
  • 811
  • 12
  • 23
2
votes
0 answers

Is there a way to allow copy and pasting in c++ when someone presses ctrl+v?

I was making a small text editor in c++ for fun and the code worked, though a bit slow, but when I tried to paste something into the editor, I ran into a problem. When I typed ctrl+v, instead of it pasting the copied text, which was a web link, it…
2
votes
1 answer

Implementing a KeyPress Event in C with Multiple Threads

My goal: A thread will wait (busy loop not sleep) until a specific key (lets say 0) is pressed. Each thread has a different key that will trigger that thread to get out of waiting and progress through the commands that follow the wait. I have tried…
user3913218
  • 77
  • 1
  • 2
  • 6
2
votes
1 answer

conio.h: No such file or directory using Linux?

I'm getting this compiling error for my program when I try to compile/run it on Linux. program7.c:9:18: conio.h: No such file or directory make: *** [program7] Error 1 I don't know what function is causing this error in Linux. I read details about…
Asia x3
  • 606
  • 2
  • 16
  • 37
2
votes
1 answer

D programming language - input without pressing enter

I'm playing around with the D programming language and am wondering how I can grab a character without requiring the user to press enter. Pseudocode example of what I want: while(true){ if(userHasPressedChar()){ writeln(getChar()); …
Grisungen
  • 333
  • 2
  • 7
2
votes
1 answer

getch() to capture Ctrl-*letter* on linux

I have decided to use getch from conio.h on Linux. I have heard that this is not recommended but I need a solution now and work to improve my programming skills later. I read a number of tutorials of how to enter one key and the program will do…
Marco Lau
  • 579
  • 2
  • 10
  • 25
2
votes
3 answers

I need C compiler to work with gotoxy(), wherex(), wherey() functions in windows7 64 bit OS

what i tried is... I am writing code to print all the c-language character set ASCII codes [0-255] along with characters (256)! As we know in C, function declaration or header file declaration is optional! void main() { int i = 0; char c1, c2; …
Omkar
  • 35
  • 1
  • 4
2
votes
2 answers

how to stop text color function under conio.h in C to align the output to right??is there any way to reset text attributes to normal in C

int main() { int i ; clrscr(); for(i = 0; i <= 6; i++) { if(i % 2 == 0) { **textcolor(2);** cprintf("%d\n", i); } if(i % 2 != 0) { **textcolor(3);** cprintf("%d\n",…
Udit Bhardwaj
  • 1,761
  • 1
  • 19
  • 29
1
vote
2 answers

Is there is any alternatives to cprintf?

I am trying to draw a Christmas tree using astrics "*" and at last I was able to draw one. The problem is when I colored it using textattr(130) "this color is GREEN with blinking" & cprintf functions the tree was scattered all over the screen. I…
ALAA
  • 11
  • 1
  • 2
1
vote
0 answers

How do I add power ups to my space invader game in C language like, double shooting, adding firing speed?

I'm having trouble with adding power ups. I don't know where to put it. I'm a first year college; can somebody help? This is what I did. I want to add power ups in this game where whenever I destroy enemy, it drops power ups like firing speed and…
1
vote
0 answers

undefined reference to symbol '_Z5getchv' (using getch() in c++)

I'm working with a device that provides conio.h, conio.c. In my c++ code, whenever I call getch(), I get these errors /usr/bin/ld: CMakeFiles/hello.dir/main.cpp.o: undefined reference to symbol '_Z5getchv' //usr/lib/libPhantomIOLib42.so: error…
CroCo
  • 5,531
  • 9
  • 56
  • 88
1
vote
1 answer

Function window() from conio.h doesnt work

I'm using turbo c++ which launches DOSBox 0.74 I have the following program: #include #include int main() { clrscr(); window(100, 100, 200, 200); textcolor(3); textbackground(6); cprintf("Hello world"); getch(); …
Yonshoku
  • 115
  • 1
  • 7
1
vote
0 answers

Graphics in devc++

After reading many previous answers on the same topic, I was finally able to run a graphic code on my machine. If I give constant values to axis and radius, circle is drawn but not a complete circle. Please let me know what is wrong with this…
Shehzad Adeel
  • 113
  • 1
  • 1
  • 6