Multi dimensional Array

Discussion in 'C++' started by Thiago Silva, Jan 11, 2006.

  1. Thiago Silva

    Thiago Silva Guest

    Hello,
    Anyone knows where I could find a class implementation for multi
    dimensional
    arrays? One wich can be created with variable number of dimension/sizes
    dinamically?

    I've tried the boost multi_array, but the dimension has to be fixed at
    compile time (since its an template argument).

    Thanks
    +Thiago Silva
    Thiago Silva, Jan 11, 2006
    #1
    1. Advertising

  2. Thiago Silva wrote:
    > Anyone knows where I could find a class implementation for multi
    > dimensional
    > arrays? One wich can be created with variable number of dimension/sizes
    > dinamically?


    Have you tried www.google.com?


    V
    Victor Bazarov, Jan 11, 2006
    #2
    1. Advertising

  3. Thiago Silva

    mlimber Guest

    Thiago Silva wrote:
    > Hello,
    > Anyone knows where I could find a class implementation for multi
    > dimensional
    > arrays? One wich can be created with variable number of dimension/sizes
    > dinamically?
    >
    > I've tried the boost multi_array, but the dimension has to be fixed at
    > compile time (since its an template argument).
    >
    > Thanks
    > +Thiago Silva


    There are many out there. Google for Matrix classes and/or see the FAQ:

    http://www.parashift.com/c -faq-lite/class-libraries.html#faq-37.9

    Also, see this FAQ, which may be all you need:

    http://www.parashift.com/c -faq-lite/freestore-mgmt.html#faq-16.19

    Cheers! --M
    mlimber, Jan 11, 2006
    #3
  4. Thiago Silva

    Guest

    Thiago Silva wrote:
    > Hello,
    > Anyone knows where I could find a class implementation for multi
    > dimensional
    > arrays? One wich can be created with variable number of dimension/sizes
    > dinamically?
    >
    > I've tried the boost multi_array, but the dimension has to be fixed at
    > compile time (since its an template argument).


    typedef std::vector< std::vector<xtype> > TwoDim;

    That is by far the easiest method to do what you want.
    , Jan 11, 2006
    #4
    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. kk_oop
    Replies:
    1
    Views:
    2,165
  2. Replies:
    7
    Views:
    844
    Ryan Stewart
    Feb 20, 2005
  3. John Harrison
    Replies:
    2
    Views:
    714
    John Harrison
    Jul 14, 2003
  4. Venkat
    Replies:
    4
    Views:
    972
    Venkat
    Dec 5, 2003
  5. Wirianto Djunaidi
    Replies:
    2
    Views:
    200
    Wirianto Djunaidi
    Apr 29, 2008
Loading...

Share This Page