简体   繁体   中英

what is meant by Permission denied

I downloaded CodeBlocks and cut and pasted and program I had written earlier which I stored in the Codeblocks folder

The program is simple enough.

    #include <iostream>

    using namespace std;

    int main(){
         cout << "Hello. Watch this space.";
          return -1;
    }

However when I try to compile this program I get this message:

ld.exe||cannot open output file C:\\Program Files (x86)\\CodeBlocks\\MyPrograms\\HelloAll.exe Permission denied| ||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 3 second(s)) ===|

Could somebody please explain what this problem is and how I could fix it?

This is an OS-level permission failure as CodeBlocks running under your user does not have access rights to write to C:\\Program Files (x86)\\CodeBlocks\\MyPrograms\\ .

You should set the output directory to be one you can write to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM