CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    188

    question about detecting file errors

    When I open a file using ifstream, the open sometimes fails. I use fail() to detect this. But I want to know why it failed and fail() only returns a dumb "yes" or "no". Is there a way to find out?

  2. #2
    Join Date
    Jan 2004
    Posts
    20
    you can use the rdstate() member function to read the state of the stream.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured