not able to open conio.h header file in linux

This is a discussion on not able to open conio.h header file in linux within the Linux Programming forums, part of the Platform Specific Boards category; Hi! I m new to linux environment . I have right simple C program and try to compile it. Code: ...

  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    104

    not able to open conio.h header file in linux

    Hi!
    I m new to linux environment .

    I have right simple C program and try to compile it.

    Code:
    #include"conio.h"
    #include"stdio.h"
    main()
    {
    printf("bargi");    
        getch();
    }
    But gcc give compile error that not able to open conio.h header file.....

    Can any body tell me solution?

    Also I want link of tutorials from which I can learn C/C++ programming under linux.

    Any help is highly appreciated.

    Thanks

    bargi
    Last edited by Bargi; 01-16-2007 at 03:51 AM.

  2. #2
    Register User andor's Avatar
    Join Date
    Aug 2006
    Location
    Novi Sad
    Posts
    42
    The program is simple but conio.h is not standard library so the function getch() also is not standard. Remove the included library and instead of getch() use getchar().

  3. #3
    Me want cookie! Monster's Avatar
    Join Date
    Dec 2001
    Posts
    680

  4. #4
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,592
    > Also I want link of tutorials from which I can learn C/C++ programming under linux.
    Too helpless to type that into a search engine?
    http://clusty.com/search?query=linux...Mozilla-search
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Newbie homework help
    By fossage in forum C Programming
    Replies: 3
    Last Post: 04-30-2009, 04:27 PM
  2. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  3. header file compile error
    By Unregistered in forum C Programming
    Replies: 5
    Last Post: 02-23-2002, 05:28 AM
  4. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 02:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21