this post was submitted on 22 Mar 2024
230 points (94.2% liked)

Programmer Humor

32410 readers
262 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 35 points 7 months ago (1 children)

Looks like we've got a Java programmer here taking C++ for a spin.

[–] [email protected] 5 points 7 months ago (1 children)

Yep, first thing that comes to mind is that header only classes need to use inline functions.

[–] [email protected] 5 points 7 months ago* (last edited 7 months ago) (1 children)

Member functions that are defined within a class definition are implicitly inline

[–] [email protected] 3 points 7 months ago

Ah I see now that I mixed it up with classless functions in a header.