The Read Only attribute in Windows 11/10 protects a file from being overwritten, modified, or deleted. As the name implies, when you set the Read Only attribute to a file or folder, you can only view ...
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 ...