this might seem silly, but I have the following:
long N = 4169;
long L = 1000;
char Nseq[N][L];
When I run the program with this and more code, I get 'segmentation fault'. Using gdb and seen the info locals
I saw this:
Nseq = <error reading variable Nseq (value requires 4169000 bytes, which is more than max-value-size)>
The way I access it in a loop for n<N:
while (fgets(line, lenline, myfile) != NULL) {
token = strtok(line, s);
while (token != NULL && n<N) {
strcpy(Nseq[n], token);
//printf("%s\t%u\n", token, n);
token = strtok(NULL, s);
n++;
}
How do I fix it? thank you! and yes, I am a beginner.