I'm doing some practice problems, and the question requires three 4x4 matrices. The first matrix is entered by the user, The second is a Transpose of the first, and the third is both the first and second matrices added together. I have already built the program. However, whenever I run it and enter
the elements for the first matrix. The display would show that the first 4 values are always 0. The following 12 values are perfectly fine, but for some
reason the first 4 is set to 0. My transpose matrix does not seem to be working, but I'm sure if i can figure out the problem with the first matrix
I will be fine.
This is my output display:
Enter the values for the 4 x 4 matrix!
--------------------------------------
Please enter the element found in row [1], column [1] : 1
Please enter the element found in row [1], column [2] : 1
Please enter the element found in row [1], column [3] : 1
Please enter the element found in row [1], column [4] : 1
Please enter the element found in row [2], column [1] : 1
Please enter the element found in row [2], column [2] : 1
Please enter the element found in row [2], column [3] : 1
Please enter the element found in row [2], column [4] : 1
Please enter the element found in row [3], column [1] : 1
Please enter the element found in row [3], column [2] : 1
Please enter the element found in row [3], column [3] : 1
Please enter the element found in row [3], column [4] : 1
Please enter the element found in row [4], column [1] : 1
Please enter the element found in row [4], column [2] : 1
Please enter the element found in row [4], column [3] : 1
Please enter the element found in row [4], column [4] : 1
void addArrays(float Yuri[][column], float Yoona[][column], float Sunny[][column]) // used to add the two vectors
{
int i; // counter
int x; // counter
Please use code tags, your code is unreadable like that.
Since you are using VC++, you have a great debugger available. Set a breakpoint in your code, step through it and watch the values of the variables to figure out what's going wrong.
Cheers, D Drmmr
Please put [code][/code] tags around your code to preserve indentation and make it more readable.
As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky
Bookmarks