Hello
I get 'segmentation fault' at seemingly random places when reading from a file = running getline(*stream, stringLine).
Running Rational Puify I get the info:
Invalid Pointer Read:
Reading 655816 bytes from 0xfefa846c between the heap and the stack (342896 bytes at 0xfefac490 illegal).

I guess that the stream pointer is bad somehow but why? How can a stream suddenly stop working?

Sounds like something else is trashing memory, clobbering your stream in the process, so that when you next refer to you stream you get the problem you see.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.