I have a problem with missing rights. I just can't create files on C:\. Folders somehow are no problem, but files don't work.
I already tried to run the .exe as an admin, which didn't help.
If anyone knows how to do this, please let me know.
You can approach the problems in two ways.
1. Take a look at the permissions at C:\ and see if you have access.
2. Use native WIN32 calls (like CreateFile()), and check your return codes.
You should be able to grant yourself access if you have admin priviledges. However, C:\ is locked down for a reason.
Can you also show us a little example? All I can say is that Also I had problems with C:, but solved them running the program as admin, thing that doesn't look like it helped you.
using namespace std;
// copy file
dst << src.rdbuf();
Last edited on
does this always work or might i get some problems with it?
You need elevated privileges to create files on C:\ drive (or whatever is your windows drive).
so this is not a programming issue. it's simply a problem of missing rights?
how can we know until we see your code ?
i was asking in general. but if that's your answer, then it is a programming issue.
you didn't give us enough info to know if it is or not.