what is goind on here? storing pointers of variables on the stack?

for/release
Denes Matetelki 12 years ago
parent 8e2f064598
commit 7c890f19c6

@ -71,6 +71,19 @@ int main()
assert(g.neighboursOf(5).size() == 0); assert(g.neighboursOf(5).size() == 0);
Graph<int> g2;
g.addVertex(1);
g.addVertex(2);
g.addVertex(3);
g.addVertex(4);
int vertices_array2[] = {1, 2, 3, 4};
std::vector<int> v2(vertices_array2, vertices_array2 + sizeof(vertices_array2) / sizeof(int) );
for (g_it = g2.begin(), v_it = v2.begin();
g_it != g2.end();
g_it++, v_it++)
assert(*g_it == *v_it);
return 0; return 0;
} }

Loading…
Cancel
Save