-7

I am making a record entry system in C++. In this system, I need to use commands like gotoxy,clrscr,sound,nosound,etc. I work in Code::Blocks IDE and use a GNU GCC compiler. For the gotoxy command, I even downloaded the header file but still it does not work. Can anyone give me the code or the duplicate of these functions.Thanks!

Box Box Box Box
  • 5,094
  • 10
  • 49
  • 67
  • what is your compiler ( conio.h does not work in the newer compilers ) – Arun A S Mar 19 '15 at 09:06
  • My compiler is Codeblocks IDE as I have mentioned in my question. – Box Box Box Box Mar 19 '15 at 09:08
  • 4
    I'm asking compiler ( like MinGW or gcc ). CodeBlocks is the IDE, not the compiler. Read this [Difference between an IDE and Compiler](http://www.cplusplus.com/articles/o8TbqMoL/) – Arun A S Mar 19 '15 at 09:09
  • 4
    FYI, those are not "commands" but "functions". They are not provided by any halfway-modern OS or compiler either, they rather come from old DOS times. Your best bet for creating a text UI is to use a so-called "curses" library. Suggestion: Your knowledge of C++ seems to be very small or outdated, so pick up a contemporary tutorial, it will answer many of your questions. – Ulrich Eckhardt Mar 19 '15 at 09:10
  • "Why many commands not working properly...?" is not an appropriate question. What do you expect us to answer: "The company doesn't test its product well enough"? – Daniel Daranas Mar 19 '15 at 09:15

2 Answers2

1

<conio.h> is ancient.

<conio.h> was commonly used in Turbo C, to manipulate the console input/output. This was prominent in the old DOS age, where most of the things were command-line.

As for now, <conio.h> is not supported in gcc.

Community
  • 1
  • 1
shauryachats
  • 9,975
  • 4
  • 35
  • 48
1

The problem is that <conio.h> does not work on modern compilers . It only works on old IDE's ones like TurboC++ and DevC++ ( They are very old, TurboC++ was used in the 20th century, no one hardly uses it anymore ). So, in short, it won't work unless you get an old compiler ( which is not a good idea ).

Arun A S
  • 6,421
  • 4
  • 29
  • 43