0

I'm used to being able to modify collection elements in C# from Visual Studio's Immediate Window. However, in C++, when I attempt to do this with a vector, I get an odd error. First, here's my collection:

vector<uint8_t>& data;

Now, from the immediate window, after breaking in after data has been populated:

data
data { size=74 }      
    [size]: 74  
    [capacity]: 74  
    [0]: 1 '\x1'  
    [1]: 5 '\x5'  
    [2]: 23 '\x17'  
    ...  

data[0] = 0   
no operator "[]" matches these operands

Is there some special syntax that I should be using here?

Justin R.
  • 23,435
  • 23
  • 108
  • 157

0 Answers0