fopen = assert error?
Using Visual C++ .NET 2003. Whenever I try to use the fopen functions, it thorows an exception error. I can't find anything on MSDN telling me of some change in the way fopen works in 2003, so do any of you know anything?
assert or exception? the two are very different.
fopen will assert on a missing file in debug mode - you can safely ignore it and continue execution - things will work as expected.
fopen will assert on a missing file in debug mode - you can safely ignore it and continue execution - things will work as expected.
It's assert.
So fopen asserts with a missing file in debug mode huh? Thanks for the info. I never knew that before.
So fopen asserts with a missing file in debug mode huh? Thanks for the info. I never knew that before.
Isn't assert only supposed to be used to test for impossible conditions? Missing files seem pretty possible to me.
Yes, but in this case they're using it for a general "alert the programmer of possible badness" - which is a possible use. Although I wouldn't do it that way myself, it does indicate to bad programmers who don't check their file is valid what went wrong.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement