Hi! I'm a new member to this forum :)
I recently started learning fstream in C++ and I have a question. How do you make it such that the user cannot edit or view the text file but the program can? Thanks!
If you don't want to pull in the windows.h header, a more lightweight solution would be to use C run-time function _chmod() . To use that function, you need to #include <io.h> .
Side note you can never make it forever un-accessable by the user as most users probably wouldn't want a bunch of files on their own computer that they couldn't edit or delete...