我有一个关于时显示错误消息的问题,每当我执行我的C++代码,错误信息如下:内存问题消息
Exception non gérée à 0x00839057 dans FirstReport1.exe : 0xC00000FD: Stack overflow.
1)这是什么意思? 2)我怎样才能避免它,并正常执行我的代码? 我正在执行的代码如下:
#include <iostream>
#include <fstream>
#include <ctime>
#include <iomanip>
using namespace std;
const int width(10001);
const int height(15);
void main()
{
ifstream inputfile ("file6.txt");
ofstream outputfile ("outfile.txt");
ofstream filteredfile ("filteredfile.txt");
ofstream timefile ("time.txt");
clock_t tstart, tend;
tstart = clock();
int i, x, y;
double tab[height][width];
for (y=0; y<height; y++){
for (x=0; x<width; x++){
tab[y][x]=0;
}
}
if (inputfile){
for (y=0; y<height; y++){
for (x=0; x<width; x++){
inputfile >> tab[y][x];
}
}
}
if (filteredfile){
for (y=0; y<height-1; y++){
for (x=0; x<width-1; x++){
if (tab[y+1][x+1]==-9999 || tab[y+1][x+1]<20 || tab[y+1]
[x+1]>1200) {tab[y+1][x+1]= 0;}
filteredfile << tab[y][x] << '\t';
}
}
}
tend = clock();
double time;
time = double (tend-tstart)/CLOCKS_PER_SEC;
timefile << time;
}
你做了什么来调试呢?你是否单步通过检查数组索引之类的东西? – 2012-04-16 08:09:00
不,我只是从菜单栏调试它 – NadCo 2012-04-16 08:10:58
我也有这个消息,如果这可以帮助找到问题: FirstReport1.exe:0xC0000005:违反德国劳动与社会事务部讲话的地方0x00390000。 – NadCo 2012-04-16 08:14:13