This C++ lab is really making me hate C++, probably more than it deserves
@elih Yeah, +=1 is one character extra and so much more readable. Plus you can't do two things at once like you could do with x++ or, the horror, ++x
@noiob Naw, it deserves it... I try to write zero classes in C++, and never ever use the iostreams...
@Fuego There's just so much I'm missing and every time I'm thinking "it's a reasonably modern programming language, I'm sure I could do this somehow" (but I'm prohibited from using advanced stuff because of the rules anyways)… I almost prefer writing C because at least I know there's no better way.
@noiob its pretty damn old - anything "modern" they tried to put in was shoehorned in later and badly.
What in particular are you looking to get done?
@Fuego I really miss being able to write `for x in y`, and would love to have better lists than C arrays (I guess Vecs would be a step up but I'm not allowed to use 'advanced' stuff)
@noiob yeah, vectors is your answer for that, if what you want is someone to handle a data structure's memory management for you.
Failing that, use a linked list over an array if you want to have a variable sized list that you just iterate through and are not using constant time access of.
What did they decide is advanced? Why make someone write C++ and not C if they cant use a vector?
so strange
@Fuego "advanced" is anything not handled in the lecture
I think they just wanna teach C with strings and bools using Visual Studio
@noiob haha so you just kind of have to take as rote all the weird shit strings can do that you're not taught or allowed to do?
oh well - god speed ;)
@Fuego yeah, when I'm handling strinfs I'm basically only iterating char by char, it's really fun /s
@noiob if you want any help with c string parsing with like strchr and strtok or whatever hmu
Okay, maybe I shouldn't have learned Rust before C++ :D :rustacean: