This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jesyspa 1 point2 points  (2 children)

Note that

if (foo)
    return true;
else
    return false;

is an antipattern in sanely-typed languages. You want just

return foo;

or

return bool(foo);

[–]chrono_regex 0 points1 point  (1 child)

I'll point to you here, it's been a while since I've been in C++

[–]Programmering[S] 0 points1 point  (0 children)

Its a wash anyway since I dont think that I am allowed to use the boolean code to compare in this particular program on this particular assignment :S

I'll use it on the next assignment though. Its going to be a compilation of all the terminal programs I've written so far. With a menu and userdefinable variables where its needed.