I have variable that is used, assigned or compared, in 5 places in my .cpp file. It is instantiated as private in the class for a total of 6 representations. When I right-click on the variable in the .cpp file and select Go to References, on the header file representation is listed. However, when I watch the left pane of the References window carefully, I notice that it does list the .cpp file but it immediately removes it. That is, it "blinks" the .cpp file.
Here is a rudimentary code snippet:
----------------------------------------
Header file (AlarmTask.h):
class CAlarmTask
{
public:
void ProcessDir(Ctime*);
protected:
int DirRxZones;
}
----------------------------------------
Cpp file (AlarmTask.cpp):
void CAlarmTask::ProcessDir(Ctime* pCurrentTime)
{
int Selection = 0;
DirRxZones = 0;
for(int i = 0; i < N_PEOPLES; i++)
if (xxx && yyy) // Could be any variable set here, I guess
{
Selection++;
}
if(Selection == 0)
{
DirRxZones = 2;
return;
}
}
----------------------------------------
When I Go To References on DirRxZones, it only lists the header file, not the .cpp file.
See attached image.
Jim