I have little program where i'm testing something; here it is:
{code]
#include <stdio.h>
#include <iostream.h>
#define HUNDREDTHOUK 100000
#define HALFMIL 500000
#define THOUTWOKAY 200000
void main()
{
int first_array [THOUTWOKAY], second_array [THOUTWOKAY], dummy;
cout << "filling first array \n";
for ( dummy = 0; dummy < THOUTWOKAY; dummy++ )
first_array [dummy];
cout << "filling second array \n";
for ( dummy =0; dummy < THOUTWOKAY; dummy +=10 )
second_array [dummy] = 0;
second_array [dummy+1]=0;
second_array [dummy+2]=0;
second_array [dummy+3]=0;
second_array [dummy+4]=0;
second_array [dummy+5]=0;
second_array [dummy+6]=0;
second_array [dummy+7]=0;
second_array [dummy+8]=0;
second_array [dummy+9]=0;
}
}
{code]
#include <stdio.h>
#include <iostream.h>
#define HUNDREDTHOUK 100000
#define HALFMIL 500000
#define THOUTWOKAY 200000
void main()
{
int first_array [THOUTWOKAY], second_array [THOUTWOKAY], dummy;
cout << "filling first array \n";
for ( dummy = 0; dummy < THOUTWOKAY; dummy++ )
first_array [dummy];
cout << "filling second array \n";
for ( dummy =0; dummy < THOUTWOKAY; dummy +=10 )
second_array [dummy] = 0;
second_array [dummy+1]=0;
second_array [dummy+2]=0;
second_array [dummy+3]=0;
second_array [dummy+4]=0;
second_array [dummy+5]=0;
second_array [dummy+6]=0;
second_array [dummy+7]=0;
second_array [dummy+8]=0;
second_array [dummy+9]=0;
}
}
Code:
It compiles and builds okay, but when I attempt to run the executeable, there's an error saying that there was a stack fault in module FOR_TEST.EXE
My previous version of this program worked okay; the only define was HUnDREDTHOUKAY, it was used in place of THOUTWOKAY.