Being an experience programmer (fortran and assembly), I decided to modernize my resume and tackle c. In the process, I learned that like other programming languages, there were many'versions' of c.
Several course books I read use the
Being an experience programmer (fortran and assembly), I decided to modernize my resume and tackle c. In the process, I learned that like other programming languages, there were many'versions' of c.
Several course books I read use the conio.h header file. I was looking for a substitute for conio.h in linux. I did indeed find a thread labled "substitute for conio.h" in this forum, but it was mostly a hatefest about whether clrscr should be used or not, and didn't really seam to answer the original question:
When you run into conio.h in a given program, and want to substitute it, so you can move on with learning code, you can't just plug and play - and there are MANY basic functions of C taught that use the conio.h (console input-output header), none of which were discussed in the forum.
Could someone with more experience in Linux C please clarify how to substitute the following commands (what header file needs to be used for each?) for the beginners trying to learn how to program in C with a Linux machine, but obviously using the wrong book. (and it might not be a bad thing to point to a proper book on programming in C specifically written for the Linux language).
The following are a list of functions in the conio.h header - there may be more, feel free to embellish.
cgets - reads a string directly from the console clrscr- clears the screen cprintf - Formats values and writes them directly to the console. cputs - writes a string directly to the console cscanf - reads formatted values directly from the console getch - reads a character from the console (without buffering or echo) getche - reads a character frm the console (without buffer but with echo) kbhit - determines if a keyboard key was pressed putch - writes a character directly to the console ungetch - puts a character into the keyboard buffer