Best Editor to write C++ program?

Which is the best editor for writing programs in c++.Currently i use DevC++. i want editor in which i could set a predefined template so that i dont have to type macros and include libraries again and again?

1 Like

For libraries, I recommend that you simply use

#include<bits/stdc++.h>

You can set predefined template in devc++ too.Go to the tools->editor->defaultsource->(paste ur template there)
:slight_smile:

1 Like

The autocorrect features are good in sublime text but it is only an editor but not a compiler…It is also good for templates…

But I strongly suggest you go for “Atom”…

1 Like

Code Blocks is one of the best ide for everyone,whether a beginner too.
DevC++ is not maintained and is buggy.Code::Blocks uses the GCC (if installed).
(Optional) Alternate: NetBeans is also good.
(Optional) You can also use gVim(download : vim online) for an IDE. If you can edit the configuration file (.vimrc file for Linux, and _gvimrc for Windows.), it is equally good. There are plugins that can be installed where “intellisense like” feature can be had in gVim.

does simply importing this imports all necessary stl libraries??
if not what specific headers are to be imported seprately.

thanks @shantanu101996 i was not aware about this:)

+1 for Atom. This is the greatest option for template programming in C and C++ for Mac. All my developers from handmadewritings are using Macs so they are in love with Atom!

I used to use CLion at a time, it was a cool IDE. You have to pay for it though.

More info here

codeblocks would be a good option. However atom looks magnificent. You have to install additional packages in case of atom and install the g++ compiler as well.
You will have to manually set the environment variable so that g++ is recognised at the command prompt!.

if You are working under a Linux or any other version of Linux, Atom would be good.

However, if you wish to avoid the hardwork of installing the compiler and packages manually.

codeblocks would be best!

1 Like

I prefer codeblocks or DevC++ for C++. I find atom a bit complicated to setup. Also CodeChef IDE is a great alternative.

1 Like

Here are pros and cons of using # include bits/stdc++.h header.
I would recommend you to add your own snippets in the sublime-text editor.
This will surely increase your productivity.Know more about it here.

Happy Coding!