Hi to all,
I have an elementary but severe problem, and excuse myself for the basic question, but I can't argue a solution.
Using VisualC++ 2003 I created a SDI graphic desktop app, based on MFC architecture (running under win XP pro sp3) for data visualization purposes.
Various private members are used to correctly scale and offset math funtions and numerical generated data to be shown in the View, and to keep track of visualization parameters. They are declared in the private section of the appView class, in the .h file, and are initializated in the class costructor (there is only one) in .cpp. Many of them are not successively overwritten. The problem is that they are correctly read and used, but watch window, intellisense and instant commmand window don't detect them as initializated and fail to show correct window, showing "strange" values. Beside, when I assign them to a local variable, the local variable assumes the correct value, but if I try to modify them directly in the same function, they continue to be shown wrong.
I have no warnings or errors
Example:
.int m_YLPrecision \\the number of significtive digits to be shown on the left y axis, declared as private in CView.h and set to 2 in the costructor.
.When used, the axis shows correctly 2 digits.
.When inspected with intellisense or watch in debug, it shows incorrect (and random) values: by now 705. (the first time the variable is used, it always shows -842150451. debug stepping the initialization line in the costructor keeps on showing the same value after the assignation!)
.m_YLPrecision++/-- works correctly: the axis shows 3/1 digits, but intellisense/watch view keeps on showing the incorrect and unmodified(!!) value (in this examples, it keeps on showing 705)
.Making the assignation : int test = m_YLPrecision,
the test variable shows the correct value!!!!!!!!
The same behaviour stands for ALL private members.
Where am I wrong?? I have 0 ideas.
Is it an error of mine (as I suppose), a misconfiguration of the project, a VS2003 issue??
I can use the class members yet, but debugging the app is nearly impossible because of the many local test variables I have to introduce.
Thanks in advance