help...2 C++ problems
(I deleted the whole program because I don't want my school mates to copy it, anyway, sorry for the inconvenience)
These two programs are the homework i needed to do. I had been figuring it out for two weeks. But my mind still seems to be stuck.
The aim of this program is to solve a twoXtwo matrix (just a twoXtwo). I had successfully used another method to finish it before. But the homework requires me to bring in a inverseArray to save the values of the changed array
I think the problem seems to be that inverseArray is changed after saving the array. But just don't know what to do with it.
void multiplyMatrices(double inverseArray,double multArray,double oneOverA)
The techniques that are allowed are arrays and the stuff before that. I know I really suck in C++, please help me if anyone knows the solution. Thank you so much.
Follow that logic and you will see that it always evaluates to true. If the character does not equal 'y', or if it doesn't equal 'Y', etc. Every character either doesn't equal 'y' or doesn't equal 'Y'. You are looking only for characters that don't equal 'y' and don't equal 'Y'.
Thank you so much, I solved the second program.
But how about the first one?
You need to set the size for these arrays when you declare them. I doubt that's the issue, but it should still be done. Also, why does your input loop have 3 values for i (0 to 2) where the rest of the code seems to assume only 2 values (0 and 1)?
Thank you so much again, you are right, I solved the program.
For your question, the input loop prompts the user to enter values A,B,C,D,E,F:
Sorry for the rest of your questions, I don't really understand what you mean. Can you rephrase it?
And can you please tell me how come I have to do so?
(p.s. My teacher taught me this would work)
I'm not sure which of my questions you didn't understand, and now that the code is gone I don't remember exactly what I meant. Basically, you can specify a function parameter as double array, but you can't specify the actual declaration of an array that way because there is no size for the first dimension. The function parameter works because the compiler doesn't care what the size is as an array parameter just points to an existing array. When you actually declare an array, though, the compiler needs the size so that it can create the memory for it. So I would use double array or double array depending on which one you actually wanted.
I am sorry, but thanks again