Originally Posted by
WilliamFerida
1. are all the compilers the same?
-i have downloaded a compiler Dev-C++ and i dont know what to do with that. i all know that i need a compiler i searched google web and typed in compiler and i choose Dev-C++,
Not even close. You will find some compilers produce far better code than others and some are a lot easier to work with than others.
As Laserlight already pointed out DEVC++ is not a compiler. It is an Integrated Development Environment (IDE) --basically an editor-- built to drive a certain compiler. In this case the MinGW compiler.
2. Is it okay to stick to Dev-C++?
-should i use different compiler? or Dev-C++ is different from others?
Yes you should use a different setup. (Note that I didn't say "compiler") Dev C++ is what we call "Abandonware". It is no longer supported and it's developer no longer updates or improves it. Yes it still works but after years of neglect, you can do much better.
3. Is Turbo C also a compiler?
-what is Turbo C? should i use it rather than Dev-C++?
Turbo C is another "Abandonware" product. This time going way back to the days of 16 bit code and pre-standards programming.
4. should i try to learn C first or C++
- which is harder
C++ is orders of magnitude more complex than C.
My own programming history started in the DOS/Pascal days but then Borland destroyed Pascal (long story). There was an interregnum of several years in which I didn't do much programming and I decided to pick up C since Pascal had become an abandoned language. I worked with C for about 6 years, mostly on a hobby level (hense my tag "Rogue C Dabbler") wrote quite a few programs, mostly for personal use. I found the transition to C++ almost impossible until just recently; this, as I discovered, was largely due to perspectives learned using Pascal and C. You will see my "breakthrough", just recently in the C++ section of this forum... and it wasn't pretty.
C++ is a "superset" of C... that is to say that almost everything in C also works in C++. But not the other way around; a C compiler will be utterly baffled by C++ syntax. So there is some value in knowing both.
Your best approach will depend in large part on how you learn. If you tend to "learn up", starting with simple things then adding new complexity as you go, starting in C is not a bad idea. However; if you tend to learn in blobs, holding certain concepts and measuring new knowledge against them, you may want to start with C++ and learn some C by osmosis, completing the study afterward. Then again if you are a "parallel learner", you may want to tackle both at once... It really is up to you.
Your first C and C++ programs will be almost identical in any case. For example, the standard "compiler test" program written by most of us as our first program "Hello World!" will compile and work on either...
Code:
#include <stdio.h>
int main(void)
{
puts("Hello World!");
return 0;
}
Compiler wise...
If you are only interested in C and you want an easy to use setup (IDE + Compiler) then I would recommend PellesC ... It comes with a heavily modified version of the LCC compiler, is C-99 standards compliant, has all the tools you need to make console and window programs and is very well documented. ( smorgasbordet - Pelles C )
If you want to start with C++ I would suggest Code::Blocks. This setup comes with a new version of the the MinGw compiler which is both C and C++ standards compliant. It's very well done but it lacks some windows tools such as a resource editor and you will have to actively hunt down C++ documentation for it... ( Code::Blocks )
Studies wise...
Be ready to read A LOT of stuff... at the top of this section is a listing of C books, a similar listing is also posted to the C++ section. I will caution that you should beware the age of some of these books... both C and C++ have changed over the years.
Hope this helps....