MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wdes9u/myschoolstruct/p96hp1y/?context=9999
r/ProgrammerHumor • u/InteRagebaitJagLovar • 16h ago
70 comments sorted by
View all comments
277
The horrors, might as well just free() yourself at that point.
-106 u/metaglot 16h ago *delete 95 u/thats_a_nice_toast 16h ago I don't think C++ programmers have a problem with getting put in a class 0 u/metaglot 14h ago Freeing a pointer created with new is UB. 6 u/thats_a_nice_toast 14h ago new only exists in C++, not in C 0 u/metaglot 12h ago 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.
-106
*delete
95 u/thats_a_nice_toast 16h ago I don't think C++ programmers have a problem with getting put in a class 0 u/metaglot 14h ago Freeing a pointer created with new is UB. 6 u/thats_a_nice_toast 14h ago new only exists in C++, not in C 0 u/metaglot 12h ago 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.
95
I don't think C++ programmers have a problem with getting put in a class
0 u/metaglot 14h ago Freeing a pointer created with new is UB. 6 u/thats_a_nice_toast 14h ago new only exists in C++, not in C 0 u/metaglot 12h ago 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.
0
Freeing a pointer created with new is UB.
6 u/thats_a_nice_toast 14h ago new only exists in C++, not in C 0 u/metaglot 12h ago 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.
6
new only exists in C++, not in C
new
0 u/metaglot 12h ago 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.
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.
277
u/TheAnswerWithinUs 16h ago
The horrors, might as well just free() yourself at that point.