writing to file

hello,
i'm trying to write to a file in c:\ directory the file is succefully opend but nothing is written there but when i write to another directory such as c:\mydir
it write there i wonder is there's any restriction writting to c:\\
thanks
There are a few, if you think you're restricted from writing to that directory simply go there, right click on an open area and try to create a new text file. This will show you wiether or not you have write permissions to that directory under your current account.
As Computergeek01 said, there are restrictions.

Given your path syntax, I assume you're using Windows.

If you're logged in as a restricted user on Windows XP or a regular user (cf. admin/power user) on Vista or later, the system will restrict what you can change.
Last edited on
computergeek01 is right it doesn't allow creating file
but i'm logged in as administrator i shouldn't have any restrictions
Are you in "My Computer" right now or "C:\"? There IS a difference.

EDIT: Also, which version of Windows are you running?
Last edited on
i'm running windows 7 and i'm working from documents because visual c++ is there
By default the "Administrator" account is disabled on Windows 7. I kind of doubt you have permissions to reenable it if you cannot write to the C:\ drive. Unless I'm missing something I think you're stuck.
thank you computergeek01 for your help i can live with that for now i'm just begining c++ but because i work as a web developer i'm picking it up quickly a part from when you deal from the operating system
thank you guys for your help
closed account (1vRz3TCk)
Windows 7 runs accounts on least privilege, it will not matter if your account has administrator privileges unless you run programs with raised privileges (i.e.Run as ... )

See: User Account Control http://en.wikipedia.org/wiki/User_Account_Control
Topic archived. No new replies allowed.