Hello I am completely stuck with my matrix problem.
First funktion should read numbers one by one to the square matrix. Matrix rotate90deg function should create new matrix which has rotated 90 degrees compared to the original matrix. The last function should print original matrix. I have also header file where
typedef std::vector<std::vector<int>> Matrix;
is defined. What is wrong with this idea ?
The vector has both operator[] and member at(). They have a tiny difference. If you would use the at() on line 12, you would notice.
Why the printout on line 15?
On rotate90deg ... isn't that called transpose?
What if you don't have a square matrix?
Why the copy on line 22?
The print() again assumes a square matrix. The m is a vector and has m.size() vector<int> in it, but how many elements each of those m.size() vector<int> does have?