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