Thread: help...2 C++ problems

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    4

    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

    PHP Code:
    void multiplyMatrices(double inverseArray[][2],double multArray[],double oneOverA)
    {
        
    multArray[0]=inverseArray[0][0]*inverseArray[2][0]+inverseArray[0][1]*inverseArray[2][1]*oneOverA;
        
    multArray[1]=inverseArray[1][0]*inverseArray[2][0]+inverseArray[1][1]*inverseArray[2][1]*oneOverA;

    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.


    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.
    Last edited by mr_god_god; 04-30-2006 at 05:41 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. No clue how to make a code to solve problems!
    By ctnzn in forum C Programming
    Replies: 8
    Last Post: 10-16-2008, 02:59 AM
  2. C Pointers Problems
    By mhelal in forum C Programming
    Replies: 8
    Last Post: 01-10-2007, 06:35 AM
  3. String Manipulation problems -_-
    By Astra in forum C Programming
    Replies: 5
    Last Post: 12-13-2006, 05:48 PM
  4. contest problems on my site
    By DavidP in forum Contests Board
    Replies: 4
    Last Post: 01-10-2004, 09:19 PM
  5. DJGPP problems
    By stormswift in forum C Programming
    Replies: 2
    Last Post: 02-26-2002, 04:35 PM