Quote:
Originally Posted by gmo
I don't think there is a problem with the code (like I said, I can get data out of the program on the university's Linux network computers).
|
With many kinds of bug (using uninitialized memory, using an object after deleting it, clobbering unrelated memory, etc.) no number of successful runs tells you there is no bug as much as one unsuccessful run tells you there is a bug.
Quote:
Could this be an issue with not having up-to-date C++ compiler or something of that nature?
|
Maybe an incorrectly installed C++ compiler (if it really isn't a bug in your code). The compile/link process might make the resulting executable depend on an incompatible version of the C++ library to the one that will be found at run time.
Quote:
I tried just printing a "1" before any variables were even initialized. It wouldn't even do that much before segmentation fault.
|
Static variables almost anywhere in the code can be initialized before the first executable atement of main, so quite a lot might be happening before that segmentation fault.
The best thing to do with a segmentation fault is use gdb to find out where the segmentation fault occurs.