Thread: Matrix multiplication help

  1. #16
    Registered User
    Join Date
    Oct 2007
    Posts
    60
    Ok, so I would need to ask the user for the number of rows in matrix 1, the number of columns in matrix 2, and the number of elements he will input in each row/col, right?

    - Also, I need to input the row at one time, using spaces. How would take each umber separated by spaces and input it into the array? Do i need to use getline?
    Last edited by Fredir; 12-06-2007 at 09:33 AM.

  2. #17
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Quote Originally Posted by Fredir View Post
    Ok, so I would need to ask the user for the number of rows in matrix 1, the number of columns in matrix 2, and the number of elements he will input in each row/col, right?
    Looks like it.

    Quote Originally Posted by Fredir View Post
    - Also, I need to input the row at one time, using spaces. How would take each umber separated by spaces and input it into the array? Do i need to use getline?
    You could. getline by itself will read the line into a string, which you will then have to split up yourself.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C - access violation
    By uber in forum C Programming
    Replies: 2
    Last Post: 07-08-2009, 01:30 PM
  2. *operator overloading: scalar matrix multiplication
    By gemini_shooter in forum C++ Programming
    Replies: 4
    Last Post: 06-08-2009, 01:14 PM
  3. Matrix Multiplication ( Accessing data from a file ) HELP
    By six_degreez in forum C Programming
    Replies: 2
    Last Post: 07-24-2008, 05:21 PM
  4. Matrix Help
    By HelpmeMark in forum C++ Programming
    Replies: 27
    Last Post: 03-06-2008, 05:57 PM