code_junkie

std::ifstream::open() not working

Nov 12th, 2011
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. std::ifstream stream;
  2. stream.open("rules.ini");
  3.  
  4. if (!stream.is_open())
  5. {
  6. throw new std::exception("Rule file could not be opened");
  7. }
  8.  
  9. // read file contents here
  10.  
  11. stream.close();
Add Comment
Please, Sign In to add comment