I seldom use the old-fashioned C-type arrays or pointers to them, 
but vectors instead, a container STL class.

#include <iostream>
#include <iomanip>
#include <vector>

using namespace std;

int main() {
vector <vector<int> > v; 

for (int i=0; i<10; i++) {
v.push_back(vector <int>()); 
for (int j=0; j<10; j++)    
v.at(i).push_back(i+j); 
}

for (vector <vector<int> >::iterator i=v.begin(); i<v.end(); i++) {
for (vector<int>::iterator j=(*i).begin(); j<(*i).end(); j++) 
cout << setw(3) << *j; 
cout << endl;
}

cin.get();
      
}

Best,

Geraldo


--- In [email protected], "s_zhbjvd" <[EMAIL PROTECTED]> wrote:
>
> Hello how are you all I just want to know that how can we use 
pointers 
> on a two dimensional array please explain !!!!!!!!
>


Reply via email to