Proper compiled codes shows errors by codechef

I am sending fully functional codes by compiling it in turbo C++ software but after submitting the codes test does not recognise the header files and shows compilation error. But those all codes are working perfectly.

Please help me solving my problem about what is the possible solution about it. Should I change my compiling software or something else.

Yes, you should change your software. Turbo C++ is an ancient IDE ( from the 20th century ). You should probably get Code::Blocks IDE or some other IDE that supports GCC.

The reason for your code not compiling on codechef is probably because you used headers like <iostream.h>. On newer versions, you don’t need the .h for c++ headers. So, you just have to use

#include<iostream>        //  see , no .h
using namespace std;

A lot has changed since the age of Turbo C++ , like the addition of the new STL libraries.

Also, don’t use headers like <conio.h> and <dos.h> as they are no longer part of the C++ standard.

Let’s try a simple program

#include<iostream>
using namespace std;
int main()
{
    cout<<"Hello world"<<endl;
    return 0;
}

This is the basic Hello World Program. You can compile it here on codechef IDE if you can’t get a new IDE for your self.

One more important thing is that on Turbo C++, you can use void main(), but on newer versions, you must use int main()

int main()
{
   // code
   return 0;
}

When I first came to codechef, I was having te same issue as you, and the users helped me by answering my question here Help me to solve Turbo C++ problem