Calculating col size of 2-d vector


I need to calculate col size of 2-D vector. I ma trying to calculate it using A[0].size(), but it’s not working


len(A) gives the number of objects in the list i.e., rows.

len(A[0]) gives number of object in each row i,e., columns.


Exactly, why is size not working?


Go for this.
For row= A.size();
For column=A[0].size();
For row=sizeof(A)/sizeof(A[0]);
For column=sizeof(A[0])/sizeof(A[0][0]);


I used,
It worked for me!!