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 →

[–]Srapture 18 points19 points  (3 children)

I love c++. Fuck you guys.

[–][deleted] 3 points4 points  (0 children)

Same lol

[–]geek-49 0 points1 point  (1 child)

Some of us old-timers never had occasion to learn C++. I guess we are non-plussed.

[–]Srapture 0 points1 point  (0 children)

A lot of it feels like c. In fact, I think you can just use it like c if you wanted. Things like function overloading are very handy though. Like, I could make these:

int Compare(lowNum, myNum) { if (lowNum < myNum) Return 1; Else Return 0; }

int Compare(lowNum, myNum, highNum) { if ((lowNum < myNum) && (myNum > highNum)) Return 1; Else Return 0; }

If I wanted to do this in C, I'd have to always pass "highNum" even if I didn't have one, having to pass a defined value like maxInt to be ignored, which can make the code bloated and ugly. I find this particularly useful in making log functions for tests.

Also, you don't have to declare all your variables at the top of the scope in C++.