Quote:
Originally posted by nmayotte
Is there a way to initialize a variable in a header file, without making it const static, because I will need to increment it later.
The problem I am running into is that for this project, I cannot edit the main driver file, only the header and definition files. And I need a variable that initially gets initialized, but not every time after that when the default constructor is called.
Does that make sense? I can explain it in more detail if neccessary.
You can declare a variable 'static' without the 'const' prefix. However,