0

Back in high school when I was taking a course on Java, we used an IDE (don't remember which) that would point out issues in code (using something that wasn't defined, syntax errors, etc) in real-time before compiling, had autocomplete, and allowed importing of missing packages by right clicking on an issue. I'm now in an intro level C++ course, and our professor recommends CodeLite as an IDE. Using it hasn't been the best experience because it's missing out on all of the things I just mentioned besides autocomplete (I'm not even warned I accidentally left out a semicolon until building).

I had an upperclassmen recommend one of JetBrains' products, CLion (overview video), which has both of the things I mentioned earlier (and much more), but in addition to costing money, it's also a subscription payment, even for personal use. For the remaining years of college, I'd like to have a free (at least for personal, non-commercial use) C++ IDE that has autocomplete, analyzes my code in realtime, notifying me of apparent issues, and also allows me to easily import classes/library packages when used without being imported beforehand. Any recommendations?

1

Clion is a great IDE, as is everything by JetBrains (you can't beat the PyCharm free community edition for Python, or WebStorm, if you are willing to pay (one off, no reannual license, like Clion)).

Clion is free to you are a full time student - look here.

Code Blocks gets great reveiws and has great features.

I also really like NetBeans, which is powerful, but intuitive.

But, if you want to prepare for industry afer you graduate, then the majority of companies where I consult are using Eclipse CDT - which does all that you ask for.

While you are at it, get yourself a version control system, learn how to debug in the IDE, and learn how to automate your unit testing (Google Test is a good place to start).

  • How can I context import in Eclipse? For instance, using cout without including iostream gives me the expected warning that cout doesn't exist: i.imgur.com/J42MB4Q.png , but when I right click on it I don't see any sort of "Include iostream" option: i.imgur.com/MAHZWIg.png – Drew Sep 6 '16 at 13:39
  • From stackoverflow.com/questions/1301850/… "Current versions of Eclipse CDT also have this functionality built in: going under the Source menu and clicking Organize Includes will alphabetize your #include's, add any headers that Eclipse thinks you're using without directly including them, and comments out any headers that it doesn't think you need. This feature isn't 100% reliable, however." – Mawg Sep 7 '16 at 6:49
  • I was previously unaware of this feature. I have just tried it and am a convert. This is excellent stuff – Mawg Sep 7 '16 at 7:05
  • 1
    It's even smart enough to factor in namespaces. If I use std::cout without including iostream, it gets included for me. If I use cout, iostream isn't included. If I add "using namespace std", it now includes iostream for just cout. Eclipse is simple enough for someone at my level to use, and as a bonus it's also used in industry -- I think this is what I'm going to go with, thanks! – Drew Sep 7 '16 at 11:51
2

I would recommend Visual Studio 2015 Community Edition if you are on Windows. Visual Studio has one of the best autocompletes I have ever seen and it supports C++.

It is meant more for .NET development as it uses C++ .NET but it will work for C++ code. It shows you errors such as missing semicolons and it has some pretty good debugging features.

Supports importing / fixing includes:

C++ include

  • Visual Studio has a lot of extra noise for someone who's learning. I also couldn't find a way to context import. – Drew Sep 4 '16 at 8:16
  • @Drew get used to it. Companies use VS in real life and you'll have benefits when you know it. – Thomas Weller Sep 4 '16 at 22:29
  • I guess it depends what you develop. I do embedded and only had one company that used MSVC, and that was 15+ years ago. All others use Eclipse. I guess you develop Windows apps(?) – Mawg Sep 6 '16 at 13:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.