this post was submitted on 02 Feb 2024
295 points (96.8% liked)

Programmer Humor

19694 readers
76 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 58 points 9 months ago (26 children)

The fact it's a pointer is part of the type, not part of the variable name. So int* p is the way.

[–] Scoopta 4 points 9 months ago (1 children)

I do this in my code because it looks better and makes more sense...until I decide to declare 2 vars on one line and then I use the very cursed int* a, *b

[–] [email protected] 4 points 9 months ago

I just wouldn't do that.

load more comments (24 replies)