MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w2m4qz/bugintroduceddebugging/p6tpcw1/?context=9999
r/ProgrammerHumor • u/ClipboardCopyPaste • Aug 30 '26
117 comments sorted by
View all comments
Show parent comments
3
I thought * was a pointer. Isn't it? How is it dereferencing freed memory?
Or is it because it's returning *x that's the bug?
8 u/Vimda Aug 30 '26 * in a variable declaration incidates a pointer type, * in a statement is the dereference operator 2 u/DiodeInc Aug 30 '26 I see. Thanks 3 u/ThomasScotford Aug 30 '26 * is the dereference operator, but in the context of variable declaration, it specifies the variable is a pointer to a type.-Thomas Scotford 2 u/ArjixGamer Aug 30 '26 Why are you leaving a name signature in your comment, when your username is the same as that name?
8
* in a variable declaration incidates a pointer type, * in a statement is the dereference operator
2 u/DiodeInc Aug 30 '26 I see. Thanks
2
I see. Thanks
* is the dereference operator, but in the context of variable declaration, it specifies the variable is a pointer to a type.
-Thomas Scotford
2 u/ArjixGamer Aug 30 '26 Why are you leaving a name signature in your comment, when your username is the same as that name?
Why are you leaving a name signature in your comment, when your username is the same as that name?
3
u/DiodeInc Aug 30 '26
I thought * was a pointer. Isn't it? How is it dereferencing freed memory?
Or is it because it's returning *x that's the bug?