It's my first time using DDD and i'm pretty inexperienced with the subject matter in question (c in unix environment) so i might be overlooking something. I'm receiving a segmentation fault when i try to fscanf from a file, which doesn't occur in a normal gcc compilation. The function is the following:
void read_config(){
FILE *fp;
fp = fopen("config.txt","r");
fscanf(fp,"TRIAGE=%dDOCTORS=%dSHIFT_LENGTH=%dMQ_MAX=%d ",&data.triage,&data.doctors,&data.shift,&data.mq_max);
}
and after reading the fscanf line it give the following message in DDD:
Program received signal SIGSEGV, Segmentation fault. 0xb7e58e1e in __isoc99_fscanf () from /lib/i386-linux-gnu/lib.so.6
I can't figure out what might be causing this issue. Thanks in advance!