Hey, I'm using the following code:
and I'm getting a core dump immediately after it prints 'return' when it reads in '0 0' from any line in the input. I tried using a counter to have a set number of iterations and it still core dumped when the while loop went false. a and b are ints. Anyone know why this might be happening? Any help would be appreciated.Code:do { printf("Start scan\n"); fscanf(in, "%d%d", &a, &b); printf("scanned %d %d\n", a, b); if(a !=0 && b!= 0) addDirectedEdge(G, a, b); printf("return\n"); } while(a != 0 || b != 0); printf("done");



LinkBack URL
About LinkBacks


