" data-bs-original-title="" title="">
According to [the manual](http://msdn.microsoft.com/en-us/library/70x4wcx1.aspx) WriteLine() returns void, you can't assign that to `answer[i]`.
I assume you're asking about the ternary operator. This: 'left': (direction === 0) ? '-100%' : '100%' Is roughly equivalent to this: if (direction === 0) { 'left': '-100%'; } else { 'left': '100%'; } So it's just a expressionized version of an if..else statement.
`continue` is a keyword in C++. Use a different name.
> What I don't understand is, would a real world program have a default constructor AND a constructor with parameters? Certainly, if there's a case where the class could initialize itself to a predictable state without help from the caller. One example might be an empty string, so std::string has …
[How would you do it on paper?](http://www.wikihow.com/Convert-from-Decimal-to-Binary) The first task is to understand the problem and solve it manually, step by step. Then you'll be in a better position to translate those steps into C++.
> I would appreciate it if someone can put more detailed comments in this source code to help me better understand it. Sorry, but no. There won't always be someone around who's both capable and *willing* to read, understand, and recomment large amounts of code just to make things easier …
The End.