In C++ it is possible to print all elements of an one-dimensional array like this :
char abc[3]={'a', 'b', 'c'};
cout<<abc<<endl;
My question is whether there is a way to do that with multidimensional arrays. Is it possible to print only one row of an array? I've tried this:
char abc[3][3]={
{'a', 'b', 'c'},
{'d', 'e', 'f'},
{'g', 'h', 'i'},
};
cout << abc[0] << endl;
However this code prints the entire array(from 'a' to 'i').
Of course I can use the "for" loop and simply iterate through the first row elements but I'm sure there should be a more compact way of doing it.
Any help would be appreciated.