Hello, so what I am working towards is making a 6 row 4 column grid which holds different numbers for each row and column. example:
1234
6123
5612
4561
3456
2345
All i need to do is go through all rotations of the rows and output correct answers.
Now what I am trying to do is rotate a single row at a time but I have no idea how. I can rotate a one dimensional array and this is my practice program to rotate only one section of a 2d array.
@OP: Very few of us know every function and library for C++ so pointing out that by 'Rotate' you mean to use the function rotate out of the algorithm.h header would help us understand your problem better. As for your sample code you do realize that 5 * 3 is 15 not 8 right? You have more room in that array then what you are using. I don't think you need to do each column as long as you can address each row, I'm trying to figure out what this function does myself at the moment but I'll post something more helpful when I do.