I'm trying to declare a 2d array by using the size() method for STL map:
const int size = edge_map.size();//get row and column size
int a[size][size];//nxn matrix
const means to not change its original (initial) value.
size must be known at compile time, as the compiler/linker allocates memory for non-local variables (declared out of any function).