//In Globals.hpp
const int SINE_MIN = 0; // only CONSTANT
const int SINE_MAX = 1; // only CONSTANT
static const int COS_MIN = 1; // STATIC CONSTANT
static const int COS_MAX = 0; // STATIC CONSTANT
What are the difference between Static Const & Const Variable ?
And if Same Variables are declared in a Class.
class SomeClass
{
const int SINE_MIN = 0; // only CONSTANT
const int SINE_MAX = 1; // only CONSTANT
static const int COS_MIN = 1; // STATIC CONSTANT
static const int COS_MAX = 0; // STATIC CONSTAN
}
I want to Set value at runtime as COS_MAX = getCosMaxFromFile()
and after that it should not be changed so Made it Const
.