J
Jinesh
I illustrate the compiler error I get using the following example.
---------------------------------------------------------------
Class ClassName
{
private:
static const int constVarName = 100;
void functionName(int parameterName)
};
void ClassName::functionName(int parameterName=constVarName)
{
some code;
}
---------------------------------------------------------------
On compiling, I get the error "A nonstatic member reference must be
relative to a specific object". I have to initialize the variable in
the header file (and not in the member initialization list of the
compiler as that causes other errors). I am using the CC compiler on
IRIX(SGI - Fuel).
Kindly post your comments. Thanks for your participation.
---------------------------------------------------------------
Class ClassName
{
private:
static const int constVarName = 100;
void functionName(int parameterName)
};
void ClassName::functionName(int parameterName=constVarName)
{
some code;
}
---------------------------------------------------------------
On compiling, I get the error "A nonstatic member reference must be
relative to a specific object". I have to initialize the variable in
the header file (and not in the member initialization list of the
compiler as that causes other errors). I am using the CC compiler on
IRIX(SGI - Fuel).
Kindly post your comments. Thanks for your participation.