This C++ lab is really making me hate C++, probably more than it deserves

Follow

@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

Sign in to participate in the conversation
Awoo Space

Awoo.space is a Mastodon instance where members can rely on a team of moderators to help resolve conflict, and limits federation with other instances using a specific access list to minimize abuse.

While mature content is allowed here, we strongly believe in being able to choose to engage with content on your own terms, so please make sure to put mature and potentially sensitive content behind the CW feature with enough description that people know what it's about.

Before signing up, please read our community guidelines. While it's a very broad swath of topics it covers, please do your best! We believe that as long as you're putting forth genuine effort to limit harm you might cause – even if you haven't read the document – you'll be okay!