read a long int frim a file and save it in the array

Hi there
I am doing a little c++ project.I want to write a code to read some data from a file and save them in the array.A sample of my data look likes this;

 ...
 0 0 0 2 1 2 -2 -2 -2 1      7367059 1244160000
 0 0 0 2 1 2 -2 -2 -1 0      3997361 291600000
 0 0 0 2 1 2 -2 -1 0 -2      -48053 38880000
 0 0 0 2 1 2 -2 -1 -2 0      1204421 583200000
 0 0 0 2 1 2 -2 -1 -1 -1      -46549 9720000
 0 0 0 2 1 2 -1 0 -2 -2      -62071 207360000
 0 0 0 2 1 2 -1 -2 0 -2      -697553 829440000
 0 0 0 2 1 2 -1 -2 -2 0      16495921 12441600000
 0 0 0 2 1 2 -1 -2 -1 -1      -1385723 414720000
 0 0 0 2 1 2 -1 -1 -2 -1      -1178033 622080000
 0 0 0 2 1 2 -1 -1 -1 -2      -554963 1244160000
...

here is my code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include<iostream>
#include<fstream>
#include<sstream>
#include<string>
using namespace std;
int main()  {

 int x[214831][12];  // 214831 is the number of rows and 12 Num of Culms
    int y[10];  
    int i=0,j=0;
    string str;
    ifstream two("10.dat");
    while (two.good())  {
        getline(two,str);
        istringstream sin(str);

            for (j=0; j<12 ;j++)
        sin >>x[i][j];
        i++;
    }
    cout<<"Please enter M's in a row: ";

           for (i=0; i<10 ;i++)
                cin >>y[i];
              j=0;
              for (i=0; i<214831 ;i++)

{

    if (y[0] ==x[i][j])
    if (y[1] ==x[i][j+1])
    if (y[2] ==x[i][j+2])
    if (y[3] ==x[i][j+3])
    if (y[4] ==x[i][j+4])
     if (y[5] ==x[i][j+5])
     if (y[6] ==x[i][j+6])
     if (y[7] ==x[i][j+7])
     if (y[8] ==x[i][j+8])
     if (y[9] ==x[i][j+9])
            cout<<"p="<<x[i][j+10]<<"\t q="<<x[i][j+11]<<endl;

    if (y[0] ==-x[i][j])
    if (y[1] ==-x[i][j+1])
    if (y[2] ==-x[i][j+2])
    if (y[3] ==-x[i][j+3])
    if (y[4] ==-x[i][j+4])
    if (y[5] ==-x[i][j+5])
    if (y[6] ==-x[i][j+6])
    if (y[7] ==-x[i][j+7])
    if (y[8] ==-x[i][j+8])
    if (y[9] ==-x[i][j+9])
            cout<<"p="<<-x[i][j+10]<<"\t q="<<x[i][j+11]<<endl;
}
              two.close();

}

The problem is that it doesn't run. It can open the file but i think problem is somewhere else.
I used
long int x[214831][12]; but the problem is still exist.
any help is appreciated.
 
long int x[214831][12]
That's a lot of data to allocate on the stack :(

The problem is that it doesn't run.
What are the symptoms?

I don't understand what the display code is doing or what it ought to be doing.
Compiler giving any sort of error on your console?
when I run the program my windows send this error:

readin_based_on _function.exe has encountered a problem and needs to close.  We are sorry for the inconvenience.

and then in the DOS it shows this:

Process returned -1073741571 <0*C00000FD>  execution time:32.109s
Press any key to continue.

Actually I guess the problem is the variables. because when I use this code for data that doesn't includes so big numbers like

12441600000

it runs without any problem. However, when I want to save data like

12441600000
into the array I encounter the problem.
I guess the problem is in definition of
 
int x[214831][12]

that should it be
 
 long int x[214831][12]
or something else?
actually what kind of variable should I define to save 12441600000 into the array?
Thanks
Topic archived. No new replies allowed.