Hello,
I'm preparing a Visual C++ 6.0 project.
I use a vector<int> variable (called vec_num), and I noticed that, when I execute the program in debug mode and the execution stops to a breakpoint (after vector initialization), if I try to view the value of an element of the vector (writing for example vec_num[2] in the "Debug Watch Window"), an error is indicated in the value column (CXX0058: Error: overloaded operator not found), as if the subscript operator of the vector couldn't be identified.
The strange thing is that, writing the line
cout << vec_num[2] << endl;
after the breakpoint, the element is printed to monitor without problems.
How is it possible? Is there any way to view the values of vector elements during the execution of a program in debug mode?
Thank you very much
Carlo
I'm preparing a Visual C++ 6.0 project.
I use a vector<int> variable (called vec_num), and I noticed that, when I execute the program in debug mode and the execution stops to a breakpoint (after vector initialization), if I try to view the value of an element of the vector (writing for example vec_num[2] in the "Debug Watch Window"), an error is indicated in the value column (CXX0058: Error: overloaded operator not found), as if the subscript operator of the vector couldn't be identified.
The strange thing is that, writing the line
cout << vec_num[2] << endl;
after the breakpoint, the element is printed to monitor without problems.
How is it possible? Is there any way to view the values of vector elements during the execution of a program in debug mode?
Thank you very much
Carlo