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 ...
An odd issue to be sure, in a niche use case. There is an office we just started working with and they have some new machines running Windows 11, alongside some older ones also running Windows 11.