c++ : 运行 使用 Dev-c++ 的简单代码
c++ : run a simple code using Dev-c++
即使我在 Dev-C++ 中 运行 一个简单的代码,我也会收到此错误消息,请帮我解决问题![=13=]
// Demonstration of variables
#include <iostream>
using namespace std;
int main()
{
unsigned short int Width = 5, Length;
Length = 10;
// create an unsigned short and initialize with result
// of multiplying Width by Length
unsigned short int Area = Width * Length;
cout << "Width:" << Width << "\n";
cout << "Length: " << Length << endl;
cout << "Area: " << Area << endl;
return 0;
}
这是错误信息:
C:\Program Files\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe cannot open output file C:\Program Files\Dev-Cpp\MinGW64\bin\area.exe: Permission denied
C:\Program Files\Dev-Cpp\MinGW64\bin\collect2.exe [Error] ld returned 1 exit status
在更合适的位置创建项目,例如 "My Documents"。 "Program Files" 用于程序文件。您的操作系统不会让您像这样创建新的应用程序。这是安全违规行为。
即使我在 Dev-C++ 中 运行 一个简单的代码,我也会收到此错误消息,请帮我解决问题![=13=]
// Demonstration of variables
#include <iostream>
using namespace std;
int main()
{
unsigned short int Width = 5, Length;
Length = 10;
// create an unsigned short and initialize with result
// of multiplying Width by Length
unsigned short int Area = Width * Length;
cout << "Width:" << Width << "\n";
cout << "Length: " << Length << endl;
cout << "Area: " << Area << endl;
return 0;
}
这是错误信息:
C:\Program Files\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe cannot open output file C:\Program Files\Dev-Cpp\MinGW64\bin\area.exe: Permission denied
C:\Program Files\Dev-Cpp\MinGW64\bin\collect2.exe [Error] ld returned 1 exit status
在更合适的位置创建项目,例如 "My Documents"。 "Program Files" 用于程序文件。您的操作系统不会让您像这样创建新的应用程序。这是安全违规行为。