July 2, 2007

&ltstdio.h how can I compile this header file program in linux?

hi, how to compile #include &ltstdio.h> header files program in linux terminal.how to compile this program in linux?

  1. #include &ltstdio.h>
  2. while(1)
  3. void main(void)
  4. {
  5. You can use stdio.h in LINUX but conio.h & dos.h are not there.
    So first of all remove them.
    Then make a simple program to print "hello world".
    Compile it using gcc or cc followed by program name.
    Then run the file a.out as "./a.out"
  6. #include &ltconio.h> /* for kbhit */
  7. int key;
  8. {
  9. key=getkey();
  10. {
  11. Any *NIX has stdio.h.
    On the other hand, no *NIX has either conio.h or (especially!) dos.h :-)
  12. use #ifdef or #indef statements to include/exlude the DOS headers.

    ex:
    #ifdef DOS
    <dos includes here
    #endif

    Then define DOS on your command line or use one of the CPP predefineds for DOS (I don't remember what they are).

  13. printf("%d %x\n", key, key);
  14. Hi, I'm assuming that < stands for <

    anyways, dos.h,conio.h are not replicated in linux. stdio.h is there.

    so it's not possible to compile this under linux using gcc

  15. int getkey(void);
  16. #include &ltdos.h>

Tags: ,

Tell a Friend Today!

del.icio.us Digg Furl Reddit Ask BlinkList blogmarks Blogg-Buzz Google Ma.gnolia Netscape ppnow Rojo Shadows Simpy Socializer Spurl StumbleUpon Tailrank Technorati Windows Live Wists Yahoo! Help

Permalink • Print

Track this entry

RSS BlogPulse

RSS Technorati Cosmos

Related Searches

, , , ,