You are using too large arrays on the stack:
double glob [26][600];
double score [600][600];
These allocate 26 * 600 + 600 * 600 = 375,600 double items. Because each double uses 8 bytes, the total amount of memory is about 3 MB which is more than the default stack size of 1 MB (with Visual C/C++).
To avoid this you can increase the stack size. But a much better solution is to allocate the arrays on the heap using
new
(with C++) or
malloc
(with C):
double *glob = new double[26*600];
double *score = new double[600*600];
Note that this requires additional code to calculate the effective item offsets (two examples from your code):
for (int i=0; i<600; i++){
for (int j=0; j<600; j++){
score[i*600+j] = 0;
}
}
for(int a=0; a<26; a++)
{
for(int b=0; b<600; b++)
{
fichier1 << glob[a*600+b]<<" ";
}
fichier1 <<"\n";
}
[UPDATE]
To increase the stack size see the
MSDN[
^].
But that is a non-professional solution for your problem. Large objects should be always allocated on the heap.