Algorithms for 2D arrays

Mar 16, 2015 at 6:26pm
Hello. Would you recommend me some good sources of algorithms for 2D arrays (merging, rotating, deleting rows, etc)?
P.S. What's the right way to declare an 2D array with the array library?
Last edited on Mar 17, 2015 at 4:09pm
Mar 16, 2015 at 10:36pm
Declaring a 2D array is as simple as adding [][] to your desired object type.
for example:

string myStringArray[2][4];
int myIntArray[1][3];
double myDoubleArray[3][2];
char myCharArray[1][4];
etc....
Last edited on Mar 16, 2015 at 10:36pm
Mar 17, 2015 at 4:12pm
I meant declaring like
 
array<int>myarr;
Mar 17, 2015 at 4:40pm
std::array<std::array<int,4>,12> data;

here data is 12x4 array of integers.
Mar 17, 2015 at 6:09pm
And same for vectors?
Topic archived. No new replies allowed.