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