Hi all, I get a seg fault on the following line of code but not every time only after the program has been running for a while and has done the routine a few times successfully... FILE * geneticfileP; geneticfileP = fopen ("./Database/tempchild.gen","w"); I have tried hunting this down logically but there are other programes accessing the file too so I ...
Hi all, I've written a C program. I need to write some data into files. I've written some code and I'm getting a segmentation fault during a call to the fopen function. I've given part of the code here. FILE *fp ; /* --- --- Some code here --- --- */ /* Check for existence of file */ fname = strdup("Host"); ...