Thread: Help with headers (conio.h etc)

  1. #1
    Registered User
    Join Date
    Feb 2003
    Posts
    10

    Help with headers (conio.h etc)

    Hi, I was looking at some sample source codes and I wanted to run them but they use some headers I dont have, like conio.h, armory.h, and rw/random.h. I tried to compile the program and it gave me an error cause it did not recognize the headers used in it. My question is, is there anyway I can get this headers so I can use them in programs I write? I am using emacs because it is the program we use at my school and I am using a windows based machine. Do I need to download and install them or do I need to get a different compiler?

    Also, I am very new to programming so this may be a stupid question but is there anyway to compile programs in C++ to run in DOS? Right now I am doing all my homework with emacs and running in cygwin (linux emulator) but I would like to write some programs to run from DOS since I work at lots of different computers all the time and most do not have cygwin.

    Thanks

  2. #2
    Skunkmeister Stoned_Coder's Avatar
    Join Date
    Aug 2001
    Posts
    2,572
    Read the goddam FAQ
    Free the weed!! Class B to class C is not good enough!!
    And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi

  3. #3
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398

    ANSI

    Now that you've read the FAQ...

    There is an ANSI standard for C++, and most compilers try to be ANSI compliant. If your book(s) are ANSI you should be able to write most simple programs to the standard. When you start using graphics and other special features, you'll need to use some non-standard libraries.

    An ANSI compilant compiler may have some "extra" non-standard header files, but these are optional. It will compile ANSI standard code. There may be a compiler option to generate a warning if you've used a non-standard function.

    Compilers are hardware and operating system specific. There are DOS compilers. Windows compilers can create console applicatins which run in a DOS-like window, but won't run in true DOS. There are versions of the GCC compiler for different operating sustems.

    There are several free compilers avaliable. The most popular is probably Borland. Or, you can get Microsoft Visual C++ for about $100.
    Last edited by DougDbug; 02-24-2003 at 02:49 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. im extreamly new help
    By rigo305 in forum C++ Programming
    Replies: 27
    Last Post: 04-23-2004, 11:22 PM
  2. include question
    By Wanted420 in forum C++ Programming
    Replies: 8
    Last Post: 10-17-2003, 03:49 AM
  3. Headers that use each other
    By nickname_changed in forum C++ Programming
    Replies: 7
    Last Post: 10-03-2003, 04:25 AM
  4. Precompiled Headers, are they necessary?
    By XenoCodex Admin in forum C++ Programming
    Replies: 2
    Last Post: 06-23-2002, 02:09 PM