struct member undefined error

 

I get this error on the following code:


class ConstantBar : public CObject
{
    private:

            ConstantBar(int pCBType, int pRange, int pArraySize, double pStartAt) : nPoint(1) {
                ... 
            };
        
            ConstantBar(int pCBType, int pRange, int pArraySize, double pStartAt, double pRetracement) 
                : ConstantBar(pCBType, Range, pArraySize, pStartAt), nPoint(1)
            {
                ...
            };
}

What am I doing wrong?

 
Where in the class do you define the data member nPoint?
 
whroeder1:
Where in the class do you define the data member nPoint?
Under the private label, it wasnt included in the code snippet, sorry
 
You can't call another constructor either.
 
Are the constructors private? If so, do you use any static method to create the instances?
 
Ex Ovo Omnia:
Are the constructors private? If so, do you use any static method to create the instances?
No, they are not private
 
You can not call one constructor from the other. If you need some common initilization stuff, move it in a private method and then call it from both constructors.