简体   繁体   English

拒绝权限是什么意思

[英]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 我下载了CodeBlocks并剪切并粘贴了之前编写的程序,并将其存储在Codeblocks文件夹中

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| ld.exe ||无法打开输出文件C:\\ Program Files(x86)\\ CodeBlocks \\ MyPrograms \\ HelloAll.exe权限被拒绝| ||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 3 second(s)) ===| || ===构建失败:1个错误,0个警告(0分钟,3秒)=== |

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\\ . 这是操作系统级别的权限故障,因为在您的用户下运行的CodeBlocks没有访问权限来写入C:\\Program Files (x86)\\CodeBlocks\\MyPrograms\\

You should set the output directory to be one you can write to. 您应该将输出目录设置为可以写入的目录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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