this post was submitted on 23 Oct 2023
523 points (96.1% liked)

Programmer Humor

32410 readers
1 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
top 7 comments
sorted by: hot top controversial new old
[–] P1r4nha@feddit.de 55 points 2 years ago (5 children)

You gotta allocate your GFs statically or this just keeps happening.

[–] Tolookah@discuss.tchncs.de 21 points 2 years ago

I tried to declare my GF global, but she became an astronaut, and I get linking errors

[–] agent_flounder@lemmy.world 12 points 2 years ago

Plus you won't worry that you forget to free her

[–] datelmd5sum@lemmy.world 10 points 2 years ago

I'd add an imaginary boolean flag to the GF class and always have an initial GF where imaginary == True.

[–] n3cr0@lemmy.world 9 points 2 years ago (1 children)

The struct and its CRUD functions seem to be all implemented. Problem is: The Create method is never be called.

[–] P1r4nha@feddit.de 8 points 2 years ago

Might be a problem with the factory then.

[–] 30p87@feddit.de 5 points 2 years ago

*'^You gotta allocate you GF$'