Turbo C++ vs. g++(4.8.1)

I have learnt programming in Turbo C++ IDE and now, when i submit my code, the compiler rejects it.

Are the codes written compatible for turbo C++ IDE valid in g++(4.8.1) ?

Is there something i can do to be able to take part in the competitions successfully??

u can go through this linkā€¦http://www.codechef.com/getting-started

Turbo C++ (TCC) is obsolete. Stop using it. The codes written on TCC are not compatible on most modern C++ compilers. For example, in TCC you have to include #include <iostream.h> while on modern compiler it will throw error. You nee to remove the .h to make it compatible. Also using namespace std is alien to TCC but not for modern compilers.
TCC does not support C++11 standard and alone makes a big reason to stay away from this compiler.

1 Like

Turbo c++ is an old compiler. It was last updated in 1994-96 but c++ was standardized much later.

But follow the following tips and you will be fine.

1)Replace #include<iostream.h> with #include. All c-headers will have a .h extention but c+Ā±headers will not have any extention.

2)Add ā€œusing namespace stdā€ before function prototype declaration.

3)Do not use #include<conio.h> and functions like getch(),clrscr().

Turbo c++ is an old compiler. It was last updated in 1994-96 but c++ was standardized much later.

But follow the following tips and you will be fine.

1)Replace #include<iostream.h> with #include. All c-headers will have a .h extention but c+Ā±headers will not have any extention.

2)Add ā€œusing namespace stdā€ before function prototype declaration.

3)Do not use #include<conio.h> and functions like getch(),clrscr().