Young man, could.you explain your shitpost?
int variable => local scope => my int from the perspective of an instance
static int variable => class scope => our int, for all instances of a class
You know what’s funny? In PHP it’s backwards :D
well of course it is!
I said, young man, what the fuck was that post?
This is a great one. I’m definitely using it in class this fall to explain static variables.
Fun fact: I made this meme to explain my classmates static variables.
I hate how long it took me to get this, but I love it.
personally I prefer including the file
prog_constants.h
int program_state; // Keeps track of stuff
in all translation units. That way I can easily keep track of what different parts of the program are doing at any time by modifying a single variable.