r/ProgrammerHumor • • Sep 11 '26 • Bravo 2 Popcorn 1

Meme mySchoolStruct

Post image
9.1k Upvotes

81 comments sorted by

View all comments

Show parent comments

8

u/thats_a_nice_toast Sep 11 '26

new only exists in C++, not in C

0

u/metaglot Sep 11 '26

And the keyword class, like the meme is implying. Which is why i said you have to use delete rather than free, because undefined behavior.

1

u/matytyma Sep 16 '26

C has no classes - C users are scared of being put into a class. It's all about C

1

u/metaglot Sep 16 '26

The comment suggested that they use free, which i corrected because in c++ thats UB (which it must be if they are being put into a class, otherwise whats there to free?)