ifstream::open() segfault

Started by
10 comments, last by Bregma 15 years, 7 months ago
after I ran that it shown

ifstream::failure trown!

e.g. caught ifstream::failure exception. But donno why its segfaulting in the same case in my programm
Advertisement
Quote:Original post by nlbs
after I ran that it shown

ifstream::failure trown!

e.g. caught ifstream::failure exception. But donno why its segfaulting in the same case in my programm

You're throwing an exception of another type when you catch the ios_base::failure exception. Do you catch that exception anywhere?

You're also catching by value. Never catch by value. Catch by reference always.

Stephen M. Webb
Professional Free Software Developer

This topic is closed to new replies.

Advertisement