Author Topic: How to debug some complex c++ stls in watches of CodeBlocks? E.G. vector<vector<  (Read 1289 times)

Offline fruitshell

  • Single posting newcomer
  • *
  • Posts: 1
I wrote a simple program concerning c++ stls. But I found that using CodeBlocks is very hard to debug with some kinds of a little more complex stls E.G. vector<vector >v. When I debug the program below with CodeBlocks, the watch of "v" looks like the picture below. However, I can watch vectorv1 and v2 just fine, which seems puzzling to me.

Code
#include <iostream>
#include<vector>
using namespace std;
vector<vector<int> >v;
vector<int>v1 = { 1,2,3 };
vector<int>v2 = { 4,5,6 };
int main()
{
    v.push_back(v1);
    v.push_back(v2);
    return 0;
}
watches of CodeBlocks image link:https://1drv.ms/i/s!AvdYBfif1jy-nSVnbBsHrj7nSlrJ?e=0Tri3G