C++, Matrix Max Length

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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
 

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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Staff online

Members online

Top