Hi guys so this part of code is to display 2d array . The first 2 arrays are working great but the last one which is the one post is not working and I can't find out why !! I will post the output also so u can see the problem . thx for ur help .
int V [][12] = {0};
int colm = 5 , row = 12;
cout<<" V area is :\n"
<<"----------------\n\n";
for( int i = 0; i < colm ; ++i ) {
for (int k = 0 ; k < row ; ++k) {
cout<< V [5][12];
}
cout<<endl;
}
cout<<"\n";
}
int V [][12] = {0};
int colm = 5 , row = 12;
cout<<" V area is :\n"
<<"----------------\n\n";
for( int i = 0; i < colm ; ++i ) {
for (int k = 0 ; k < row ; ++k) {
cout<< V [5][12];
}
cout<<endl;
}
cout<<"\n";
}
To copy to clipboard, switch view to plain text mode
V Area :
------------------
151515151515151515151515
151515151515151515151515
151515151515151515151515
151515151515151515151515
151515151515151515151515
V Area :
------------------
151515151515151515151515
151515151515151515151515
151515151515151515151515
151515151515151515151515
151515151515151515151515
To copy to clipboard, switch view to plain text mode
Bookmarks