Hello,
I'm just wondering whether or not, it is possible to get the vector Dimensions without them being set?
Basically, I'm converting some matlab code and there's a function size(VECTOR) which get's the dimentions of the vector being passed.
For example:
#include <iostream>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
vector<vector<int> > items;
vector<int> theItems(20);
for(unsigned i=0; (i < 20); i++)
{
theItems.push_back(i);
items.push_back(theItems);
}
}
I need to determine the dimensions of items. Can I use something like capacity? Or is there a STL function like in matlab where you have size.