ANSWERS: 3
  • All C++ compilers tell you what's wrong. I think Microsoft's compiler probably has the best messages, but they all do at least a passable job. The trouble is the "what to do about it" part -- to solve that, the compiler would have to understand your *intent*, which is precisely the thing it can't figure out because you've botched the syntax. So you would be asking the compiler to be psychic, something I haven't even gotten polished yet.
  • For example temp = current; current = next(); if (current.isRight()) last = temp; there is no way to tell that you should have an else there, setting current back to temp if the value it got from next() was wrong. else current = temp; As a result both last and current are set to the wrong values.
  • There's a website called answerbag where I'm sure many people would be willing to help if you had a problem and asked nicely. But as stated before, your compiler should tell you what's wrong. How to fix it becomes easier with practice.

Copyright 2023, Wired Ivy, LLC

Answerbag | Terms of Service | Privacy Policy