samedi 14 mars 2015

How do I get the dimensions (nestedness) of a nested vector (NOT the size)?


Consider the following declarations:



vector<vector<int> > v2d;
vector<vector<vector<string>> > v3d;


How can I find out the "dimensionality" of the vectors in subsequent code? For example, 2 for v2d and 3 for v3d?




Aucun commentaire:

Enregistrer un commentaire