Can someone explain the difference between a static and const variable?
static
const
Const means “cannot be changed.”
Static means “static instance (in memory) vs dynamic instance (on the stack.)” Static variables exist for the duration of the program. Dynamic ones are created and destroyed as needed.
A variable can be one or both.