Which is the best C++ compiler ? How can we download and install GCC compiler and use it with VIM and EMACS editor to compile and run our code ? Thanks.
There is no best C++ compiler. I have used 3 compilers - g++, Visual C++, and clang++. All these are popular and widely used.
For comparison of features (C++11) see this page - https://wiki.apache.org/stdcxx/C++0xCompilerSupport
But since Codechef uses GCC 4.3.2 (outdated compiler), you should go for gcc (current version is 4.8).
On my Ubuntu 12.04, GCC is already installed and I installed clang using -
sudo apt-get install clang
On windows you can install gcc through MinGW.
I use gVim for editing and g++ for compiling. So if the source file (prog.cpp) resides in /home/vinayak/code.
First open gVim and change directory using (in Command mode) “:cd /home/vinayak/code”. Then open file using “:e prog.cpp”
Now open terminal and change directory using “cd /home/vinayak/code”, and compile using “g++ prog.cpp -oprog” and run using “./prog”.
Personally I like Visual C++ even if its not allowed because it is updated and efficient, not to mention that no configuring for gcc makes things less complicated
Codechef does support GCC 4.8.1.