this post was submitted on 03 May 2024
243 points (94.5% liked)

Programmer Humor

31250 readers
1554 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS
 

Alt text:

Image that says:

HOLY SHIT!! IS THAT A MOTHERF*CKING C++ REFERENCE???

int& a = b;

you are viewing a single comment's thread
view the rest of the comments
[–] TheEntity@lemmy.world 6 points 2 months ago

An int& reference is just as much of a variable as int* const would be (a const pointer to a non-const int). "Variable" might be a misnomer here, but it takes just as much memory as any other pointer.