can someone please tell me the main difference in turbo & dev C++.
I can program in Turbo C++ but don’t know a thing about dev. So can I ask u a favour to teach me what all i should know to program in dev c++.
Please teach me what all is new.
can someone please tell me the main difference in turbo & dev C++.
I can program in Turbo C++ but don’t know a thing about dev. So can I ask u a favour to teach me what all i should know to program in dev c++.
Please teach me what all is new.
I tried out procon junior and was able to make most of problems in turbo but couldn’t do a thing when it came to dev and couldn’t submit even a single correct answer.
Please help me.
Example: #include< iostream> (not < iostream.h >)
The thing is that turbo is an old compiler, and the compilers here at codechef or any other programming site will compile according to the current standard.
So, you have to code according to the current C++ standards.
Codechef uses GCC compilers.
Start using dev C++, it is a good compiler.
Here, is the sample code in dev:
#include< iostream > //See no .h
#include< cstdio>
using namespace std; //As namespaces were introduced in C++ after turbo
int main()
{
int a;// the size of int will be 4 bytes in DEV C++ as it is 32 bit compiler
cin>>a;//rest is the same as turbo.
cout<< a;
return 0;
}
// All standard C files like string.h,etc are used by dropping the .h and placing a c before the name, like < string.h> will be < cstring> but .h will also work. So, <string.h > will also work fine.
First thing first, Turbo C++ and Dev C++ are not compilers, they are IDE(Integrated Development Environment)…
The difference between them is that the Dev C++ uses MinGW compiler while Turbo C++ use Turbo C++ compiler(Borland’s compiler).
The main similarity being DevC++ and Turbo C++ are both outdated.
I would suggest you to use codeblocks or the updated version of DevC++ made by Orwell(http://sourceforge.net/projects/orwelldevcpp/) which is much better than the original devC++ though there are some problems with it.
Using DevC++:
Make sure you are using standard headers. Do not use conio.h ; this is not part of the C standard library. Do not use iostream.h; this is a deprecated header file and again is not a standard library. (You should just be using iostream instead).
Other than this you should read STL tutorials from topcoder:
http://community.topcoder.com/tc?module=Static&d1=features&d2=082803
http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=standardTemplateLibrary
Also make sure you read the code written by other people(You can find the AC solutions in ‘Other Submission’ Button in any problem page).
If you want help…then comment your prob…i will be happy to help.