Open demo-acct opened 5 months ago
I think there is a bug here:
sample[c][0] = -1.0; for(i=1;i<=inputs;i++) scanf("%lf", &sample[c][i]);
since you started i=1, then scanf should use ("%lf", &sample[c][i-1]). Otherwise the last item will be read unknown memory space.
Good catch! I should have allocated one more position, as I did at line 171. Feel free to contribute 😎. Perhaps the compiler I used at the time let this one slip without the classic segmentation fault. Thanks!
I think there is a bug here:
since you started i=1, then scanf should use ("%lf", &sample[c][i-1]). Otherwise the last item will be read unknown memory space.