I have a structure called A, whose constructor looks like this
1 2 3 4
|
A::A() {
N = new vector<neuron*>(INPUT);
N_active = new vector<size_t>;
}
|
Whenever I run this constructor, the vector pointed to by
N_active
has a length of
INPUT
, and the vector pointed to by
N
has a length of 0. Furthermore, running this:
N_active->resize(0);
has no effect, but running this:
N->resize(0);
has the effect of reducing the size of
N_active
to 0... No I'm not mixing up the variable names, it's really doing that!
The memory locations pointed to by
N_active
and
N
are
not the same. Does anyone have an explanation for this behaviour? It's really hard to figure out where this could come from. I'm using VS2010 Ultimate..