Depends on your definition of best. This would be an opinion at best.
You can't write programs "in a compiler". Compilers simply take the code text and, as the name says, compile it to an executable.
Code::Blocks is an IDE with a good compiler (MinGW). You can also use other compilers with it.
Use a GNU compiler which supports the 'Standard (C++, C)'.
No, I do not think you can write a C++ program using a 'C' compiler ('C' does not have classes and many other 'C++' features.).
For your information, not all C++ compilers are able to compile 'C' programs effectively. One reason for this is because of 'C++'s' strict type-checking.
If you use visual studio's 'extra' libraries you could make your program unportable (i.e It will work only on Windows and you will have to rewrite some code to make it work on Linux or Mac). But it is a very good IDE (has automatic code completion).
I had heard that MS Visual Studio does not use Standard C++, please check, not sure.
Dev-C++ is not a good IDE. Try Eclipse or NetBeans.
I use Code::Blocks with MinGW compiler.
Yes, I use Xcode on the Mac because Code::Blocks has bug's in it for the Mac version.
Xcode is much more fun than Code::Blocks actually, too bad you don't get it for Windows.
i liked codeblocks for the short time i used it. it was more strict then my visual studio compiler. however even the most basic programs had dependencies on other files. it was very annoying to just test a quick release program. you end up missing like 6 run time files. you can fix this with compiler options but ts annoying to have to do it every time.
If you're on Windows, then I think Microsoft Visual C++ is a good choice - it has a good debugger and good code prediction and so forth. However, Microsoft's compiler has lamentable support the the upcoming C++0x standard compared to GCC. Thus, you might want to consider Code::Blocks as well.
acorn wrote:
more strict then my visual studio compiler.
As in it gave you more warnings and errors? You should be able to customise the verbosity of both compilers.
acorn wrote:
you can fix this with compiler options but ts annoying to have to do it every time.
Most compiler settings in Code::Blocks can be configured globally as well as on a per project basic (just go to Settings -> Compiler and Debugger).
EDIT: And I'm a pretty good C++ complier. I usually take on the programming practices I see endorsed by others.