ifstream file; file.open("myfile.txt", ios::binary); if(file.good()) cout<<"yay\n"; else cout<<"boo\n"; Everything works great if the file is not marked as read-only ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results