Question: I am supposed to perform a matrix calculation using pointers in c++, the function works fine with square matrices, however in some cases it gives
I am supposed to perform a matrix calculation using pointers in c++, the function works fine with square matrices, however in some cases it gives me wrong result, for example for a multiplication between two matrices with sizes 3*2 and 2*5, what am I doing wrong? this is my function:

float* temp = new float [row1 * col2] ; for (int i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
