Watch window error in VS2005

I am using Visual Studio 2005, I have the following code


#include "genlib.h"
#include <iostream>
#include <fstream>
#include "map.h"
#include "set.h"
#include "simpio.h"
#include "vector.h"

void InsertionSort(Vector<int> &v)
{
int i,j;
for (i = 1; i < v.size()-1; i++) {
int cur = v[i]; // slide cur down into position to left
for (j=i-1; j >= 0 && v[j] > cur; j--)
v[j+1] = v[j];
v[j+1] = cur;
}
}

int main ()
{
int i=0;
Vector<int> v;
v.add(92);v.add(45);v.add(67);v.add(41);v.add(74);v.add(28);v.add(87);v.add(8);v.add(67);v.add(15);v.add(59);
InsertionSort(v);
for(i=0;i<v.size()-1;i++)
cout<<v.getAt(i)<<endl;
return 0;
}


This code get compiled and run but when I go to debug mode and put v[j+1]or v[j] the I get the error:

CXX0034: Error: types incompatible with operator in the watch window

I also tried to use v[1] or v[0]..etc but the same problem remains there...

Is there anyway to get rid of that?

Thanks in advance
You'll need to show what's in vector.h.

When you post code, can you please use the code format tag on the right.
Topic archived. No new replies allowed.