Categories
October Surprise 2024

Define constant variables in C++ header – Stack Overflow

Also, you can use const int in a header file, since const variables have internal linkage by default. Whether you’d want that, rather than a single instance, is another question; usually, it makes little difference as long as the value is available in the header.