Matrix multiplication help

This is a discussion on Matrix multiplication help within the C++ Programming forums, part of the General Programming Boards category; Ok, so I would need to ask the user for the number of rows in matrix 1, the number of ...

  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,185
    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.

Page 2 of 2 FirstFirst 12
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, 02:30 PM
  2. *operator overloading: scalar matrix multiplication
    By gemini_shooter in forum C++ Programming
    Replies: 4
    Last Post: 06-08-2009, 02: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, 06:21 PM
  4. Matrix Help
    By HelpmeMark in forum C++ Programming
    Replies: 27
    Last Post: 03-06-2008, 05:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21