1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

C++, Matrix Max Length

Discussion in 'Software Development' started by calculus87, Sep 12, 2003.

Thread Status:
Not open for further replies.
  1. calculus87

    calculus87 Thread Starter

    Joined:
    Sep 4, 2003
    Messages:
    34
    Hello,
    I have a small problem. I am currently creating a 2 dimensional array (or matrix) of size 100 by 100. Now I get errors when I make my matrix larger than 210 by 210.
    The problem is is that I need a matrix 10000 by 10000.

    example code:
    double data[10000][10000]; //this gives errors


    Okay, which would be the best way to go and will work?
    First, don't do 2 dim array, do a 2 dim vector.
    Second, don't do 2 dim array, do pointers in two directions.
    Or Third do the 2 dim array but go in another direction.

    I understand that that is like 800 Megabytes. I can shrink it down to 1000x1000. But that is the lowest I can possibly go

    Thanks for the thoughts
    Sincerely,
    Ronald
     
  2. calculus87

    calculus87 Thread Starter

    Joined:
    Sep 4, 2003
    Messages:
    34
    Okay,
    The data is going to be read in from a file. It is actually a docuement that is about 800 pages in length. My program parses the data, and stores all the necessary information. I believe I am going to store the data into a 2D Vector. THe problem is that I have no examples that are functioning, so I cannot see what I am going wrong. If you could help me out in this area (providing me an example of a working 2D Vector), I would be most appreciative.
    ~Ronald
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/164238

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice