Dynamic Matrix

Discussion in 'C++' started by Gaijinco, Oct 31, 2005.

  1. Gaijinco

    Gaijinco Guest

    If I want to create a dynamic array I may use this:

    int size;
    cin >> size;

    int *nameArray;
    nameArray = new int[size];

    Is there a way to create a dynamic matrix?
     
    Gaijinco, Oct 31, 2005
    #1
    1. Advertising

  2. Gaijinco

    Guest

    Gaijinco wrote:
    > If I want to create a dynamic array I may use this:
    >
    > int size;
    > cin >> size;
    >
    > int *nameArray;
    > nameArray = new int[size];
    >
    > Is there a way to create a dynamic matrix?


    This is in the FAQ
    http://www.parashift.com/c -faq-lite/freestore-mgmt.html

    You particularly want 16.16 through to 16.19

    Gavin Deane
     
    , Oct 31, 2005
    #2
    1. Advertising

  3. Gaijinco wrote:
    > If I want to create a dynamic array I may use this:
    >
    > int size;
    > cin >> size;
    >
    > int *nameArray;
    > nameArray = new int[size];
    >
    > Is there a way to create a dynamic matrix?


    Yes. Read the FAQ.

    V
     
    Victor Bazarov, Oct 31, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Antonietta Tobito via JavaKB.com

    Dynamic radio buttons matrix using Struts

    Antonietta Tobito via JavaKB.com, Feb 2, 2005, in forum: Java
    Replies:
    2
    Views:
    3,390
    Wendy S
    Feb 2, 2005
  2. lvcargnini

    Matrix composed by two matrix

    lvcargnini, Jul 4, 2006, in forum: VHDL
    Replies:
    3
    Views:
    2,718
    Jonathan Bromley
    Jul 5, 2006
  3. Holgerson

    Matrix*Vector and Vector*Matrix

    Holgerson, Oct 25, 2007, in forum: C++
    Replies:
    3
    Views:
    436
    Holgerson
    Oct 26, 2007
  4. Terry Reedy
    Replies:
    0
    Views:
    587
    Terry Reedy
    Apr 2, 2009
  5. Robert Kern
    Replies:
    0
    Views:
    624
    Robert Kern
    Apr 2, 2009
Loading...

Share This Page