S
Sascha T.
Hi!
I didn't get the idea of exactly *how* such an array of vectors work.
Consider this minimal code:
--------------------
#include <vector>
using namespace std;
int main ()
{
vector< vector<int> > vI;
vI.resize(10);
for(int i(0); i<10; i++)
{
vI.resize(3);
}
vI.clear();
}
---------------------
Will vI.clear() really free *all* vI, too?
Or will I need another loop just before calling vI.clear() to sequentially
delete all vI: such as:
--------------
for(int i(0); i<10; i++)
{
vI.clear();
}
--------------
Thanks in advance
Yours
ST
I didn't get the idea of exactly *how* such an array of vectors work.
Consider this minimal code:
--------------------
#include <vector>
using namespace std;
int main ()
{
vector< vector<int> > vI;
vI.resize(10);
for(int i(0); i<10; i++)
{
vI.resize(3);
}
vI.clear();
}
---------------------
Will vI.clear() really free *all* vI, too?
Or will I need another loop just before calling vI.clear() to sequentially
delete all vI: such as:
--------------
for(int i(0); i<10; i++)
{
vI.clear();
}
--------------
Thanks in advance
Yours
ST