Hello. Please, i have this little question of finding the product of two matrices in which the user enters the number of rows and columns. i would appreciate it if a solution is given and even more if there are more than one solutions to the question. thanks.

I think the key for this are how you stone the matris?
Easy is stone data as xy grid.

struct matris {
int x;
int y;
int * list;
}
And use this for get and some like for save.
int get(matris submem,int x, int y) {
   return submem.list[x+submem.x*y];
}

You can read how the work.
http://en.wikipedia.org/wiki/Matrix_%28mathematics%29
http://upload.wikimedia.org/math/3/4/4/344d710625da685082ddc0c5ba310f19.png

you most fist get the new size of matris for make a new struck.
After this i well use loops for do the calc foreach cell in matris.

/ FIG

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.