Thread: not able to open conio.h header file in linux

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

    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 04: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 int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    > 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.

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, 06:28 AM
  4. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 03:58 PM