when I try to run the code, I get a segmentation fault core dumped
it returns 139 (0x8B)
the file it is pulling from is a list of numbers, but without the string, the output ends up going from values of ~70,000 to values around 50
That's pretty much unreadable as presented. Can you:
1. Format your code using the format tags and ensure it's indented in a reasonable manner.
2. Remove calls to open/close on streams, it's wrong and distracting.
3. Don't check a stream if it's open, check if it's good. For example:
1 2 3 4
std::ifstream f1(filename);
while (f1) // test for good
{
// do stuff with f1