0

I've just started using c++ on netbans and I've noticed that when an error ocurrs, the IDE doesn't give any hints (like it did for example using java), and it nearly always display the same message so it takes me ages to find why did it happen.

Is it possible to download or set something to have more descriptive errors??

Alex Dickson
  • 39
  • 10
  • 1
    Part of this is a "[Eat your dog food"](https://en.wikipedia.org/wiki/Eating_your_own_dog_food) problem. Netbeans is written in Java, so it makes sense that Java is better supported. But... Most of this is because C++ is a vastly weirder language that requires much more context and is much harder to parse, so the realtime code analysis software can't keep up without taking shortcuts that greatly limit the quality of the diagnostics. You are far better off compiling and testing early and often to see what the code will really produce. And even then error messages can get long and ugly. – user4581301 Mar 14 '17 at 16:44
  • Related information: [Why does C++ compilation take so long?](http://stackoverflow.com/questions/318398/why-does-c-compilation-take-so-long) – user4581301 Mar 14 '17 at 16:48
  • Are there any other c++ IDE's to use that have better error messages?@user4581301 – Alex Dickson Mar 14 '17 at 16:57
  • I'm tempted to say that none do, but I haven't used a wide enough cross-section of the currently available dev tools to say for sure. This is why I haven't posted a formal answer to the question. I use Eclipse's CDT and Visual Studio and both have significant holes and false positives. The best error messages you are going to get are from the compiler or a static analysis tool. Unfortunately this does not necessarily make them more readable, just more useful than "Syntax Error". – user4581301 Mar 14 '17 at 17:15
  • 1
    I will recommend turning on the following extra diagnostics for a GCC-based compiler: `-pedantic -Wall -Wextra` and if you want to be a bit more "'core", `-pedantic-errors -Werror` to make the warnings errors so you can't ignore them. None of these make the messages any more readable, but they catch a more mistakes that can save you debugging time later. – user4581301 Mar 14 '17 at 17:17
  • @user4581301 Wow thanks for your response, I will definitley check these, I really appreciate your help! – Alex Dickson Mar 15 '17 at 20:38

0 Answers0