Thanks for you comment.
It's solved by using "vector<double> time;"
But I still don't understand how this error happened.
Since the elements number around 4M, but I defined 5M array.
Why over size?
Does the table and end line character (" " and "\n") occupy "place"?
He is saying that the program is only given a small amount of stack memory. The problem is not in your use of the array. It isn't a buffer overflow that he is talking about. he is saying that the program simply cannot construct an array of that size on the stack. A vector works because the vector's underlying pointer attribute points to a block of memory that was allocated using heap memory. So even though the vector itself uses stack memory for some of its class attributes it creates a dynamic array using heap memory.