Use of undeclared identifier

In my header file i have a private variable:

  
ofColor hitColor;  
  

Also i have the following empty constructor and method:

  
        ImageRayTracer(void);  
        void setHitColor(ofColor c);  

My implementation looks like this:

  
ImageRayTracer::ImageRayTracer(void) {  
    hitColor.set(0);  
}  
  
  
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  
  
void setHitColor(ofColor c) {  
    //Use of undeclared identifier  
    hitColor = c;  
}  

But i get “Use of undeclared identifier”, how can this issue be solved?
I looked at stackoverflow but i mostly saw iphone development solutions with @synthesize etc.

Should be this

void ImageRayTracer::setHitColor(ofColor c) {

thanks

No problems. Sorry for the brevity… was using my phone (and this is not the easiest site to work on a mobile!)