this post was submitted on 13 Dec 2025
614 points (97.7% liked)

Programmer Humor

27867 readers
964 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 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] untorquer@lemmy.world 3 points 1 day ago* (last edited 1 day ago)

Something like

int *a = new int(10)

Int*b = null

While *b !=10 { b = rand(); a=new int(10)}

Return *b

I haven't coded recently enough in c/c++ to remember syntax but the concept might work eventually if you're lucky and have enough memory... Might need a time variant seed on the rand()...