hello,
im currently writing a class which stores matrices and performs arithmic operations with them.
the matrices are stored as follows:
to access the matrix easily, the following is used:Code:float *pfaMatrix = new float[nColumnCount + nRowCount];
using those methods, i can use the array as if it was a two-dimensional array but without the restriction that i have to do thisCode:index = nRow * nColumnCount + nColmy problem is now, that i do not really know, how to write the function of the overloaded * operator to multiply two matrices. maybe i just need the right approach. in the beginning of the funct. i already made a new matrix of the correct size:Code:float *pfaMatrix = new float[nRowCount][CONST];
i hope someone could help me! thanks!Code:float *pfaResMatrix = new float[cMatrix1.m_nRowCount + cMatrix2.m_nColumnCount];
yours sincerely,
replax




Reply With Quote
