Thread: conio.h header file

  1. #1
    Registered User
    Join Date
    Oct 2012
    Posts
    19

    conio.h header file

    i try to run this code with Xcode.

    but Xcode does not recognize this header conio.h



    Code:
    #include<stdio.h>
    #include<conio.h>
    
    void main()
    {clrscr();
        int a[24],b[24],i,j;
        int dislay(int,int);
        cout<<"etr a[24]=";
        for(i=o;i<25;i++)
        {cin>>a[i]};
        cout<<"etr b[24]";
        for(same)
        {cin>>b[i];}
        for(same)
        {if(a[i]==b[i])
            cout<<"identical at a or b["<<i<<"] no. is="<<a[i];
        }
        for(same)
        {
            for(j=0;j<25;j++)
            {
                cout<<"a["<<i<<"]==b["<<j<<"] is =";
                display(a[i],b[j]);
            }
        }
        getch();
    }
    display(int x,int y)
    {if(x==y)
        cout<<"true";
    else
        cout<<"false";
    }

  2. #2
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907
    It's an old header, useful for a MS-DOS environment - Not all compilers support it.

    Should this be moved to the C++ forum?
    Fact - Beethoven wrote his first symphony in C

  3. #3
    Registered User
    Join Date
    Oct 2012
    Posts
    19
    Quote Originally Posted by Click_here View Post
    It's an old header, useful for a MS-DOS environment - Not all compilers support it.

    Should this be moved to the C++ forum?
    thanks but i should write this program with C language

  4. #4
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    Quote Originally Posted by r3zaneo View Post
    thanks but i should write this program with C language
    Then I suggest writing C code instead of C++.
    cin and cout and both NOT in C instead are part of C++.

    Tim S.
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  5. #5
    TEIAM - problem solved
    Join Date
    Apr 2012
    Location
    Melbourne Australia
    Posts
    1,907
    Quote Originally Posted by [URL="http://cboard.cprogramming.com/member.php?u=62796"
    r3zaneo[/URL]]
    thanks but i should write this program with C language
    In that case, all cin/cout need to be removed and you need to be looking at the functions printf and scanf.
    Fact - Beethoven wrote his first symphony in C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. not able to open conio.h header file in linux
    By Bargi in forum Linux Programming
    Replies: 3
    Last Post: 01-16-2007, 06:12 AM
  2. Replies: 30
    Last Post: 06-19-2006, 12:35 AM
  3. Including header file with in the header file
    By Arafat_211184 in forum C Programming
    Replies: 13
    Last Post: 12-19-2005, 10:03 AM
  4. Replies: 4
    Last Post: 12-14-2005, 02:21 PM
  5. Conio.h file problems
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 05-23-2002, 01:44 PM

Tags for this Thread