Message from C, C++ discussions

December 2019

— And we have assumed that there is a capital letter in the string that we pass


Hi,I'm working on an exercise for the Classes, I created the class Matrix3D and I created the methods getdim and print.

— And?

— Now I want to create a method sum, to sum 2 Matrixes(with the same dimensions) , the method must to do with pointers and must return a pointer, Matrix3D* sum(Matrix3D* m1, Matrix3D* m2) , but how can I select every element of m1 and m2 and put the sum in mat_sum?

Message permanent page

— Https:// this is the code that I wrote but I don't know what I should put in the FOR to select the elements,to sum and to put in mat_sum

Message permanent page

— Why are you using dynamic allocation for the sum

— I must return a pointer

— Matrix3D* mat_sum

— Can I see the header file pls

— Okay

— Ty

— Https://