Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

27
  • 7
    "So, how should a novice programmer approach the challenge of understanding compiler error messages?" /sarcasm The 1st skill needed is to be able to read every bit from the compiler message, including to relate it with the very context. /sarcasm off. It rarely turns out to be a flaw, or bug in the compiler. Commented May 18, 2018 at 18:27
  • 10
    @MasonWheeler: A novice often does not choose which compiler to use when undergoing training. And GCC is a common denominator of many, many systems... Commented May 18, 2018 at 18:38
  • 25
    When it comes to GCC C++ template errors, I find if I stop reading after "Error <file:line>" and study the source file(s), I find the error quicker, with an added side effect of maintaining my sanity, than if I read the actual error given by GCC..... Commented May 19, 2018 at 5:47
  • 19
    The solution is obvious: Use a compiler with less confusing output. I suggest rmcc. It prints Yes. or No. depending on if your code compiled or not. Instantly takes away the frustration from not understanding long and pointless messages! Commented May 19, 2018 at 11:39
  • 21
    C is not a good language for beginners — and you have stumbled upon one of the reasons. That being said, Clang tends to offer much better errors that might also be more appealing to beginners. Commented May 19, 2018 at 14:43