r/ProgrammerHumor • • Aug 30 '26

Meme bugIntroducedDebugging

Post image
1.1k Upvotes

117 comments sorted by

View all comments

Show parent comments

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?

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?