this post was submitted on 11 Oct 2023
348 points (92.4% liked)

Programmer Humor

32000 readers
1744 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
348
submitted 11 months ago* (last edited 11 months ago) by [email protected] to c/[email protected]
 

Used all of these three. I don't want to even look at MS Visual C/C++ ecosystem.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 7 points 11 months ago* (last edited 9 months ago) (1 children)

[This comment has been deleted by an automated system]

[โ€“] [email protected] 1 points 11 months ago

If data structures weren't working with MSVC, you're probably working with non-portable code in the first place. Don't assume an int is 32 bits long!

Oh absolutely! I was starting out during this time, and started using memcpy for a uni project, hardcoding byte sizes to what I assumed long's size was, instead of checking or using standardized data types (because I didn't even know they existed). The result was such a mess, exacerbated by the good ol "let's write it all in one go and run it when we're done". Boy did I suffer in that class.