我正在使用带有 TDM-GCC 的 Notepad++。我的电脑是 2Gb RAM Windows 10 32 位 3.30 GHz。当我执行我的简单程序时,它显示错误。
Access is denied.
An attempt was made to execute the below command.
Command: D:\Deane\Github\CPP_Projects\AnalysisName\main.bat
Arguments:
Error Code: 5
我遵循这个:ShellExecuteEx 函数总是返回错误代码 5 (C++)
程序代码(如有必要):
/* AnalysisName Program - written by Vo Tran Nha Linh */
#include <iostream> // Input and Output library.
using namespace std;
int main()
{
string name;
cout << "Hello friend! It's nice to meet you, what is your name?" << endl; // Ask the name.
cin >> name; // Input name.
cout << "Hello " << name << ". Your name is interesting." << endl; // Have a greeting.
cout << "Your name has " << name.length() << "letters." << endl; // Show the name's length.
cout << "It starts with " << name.front() << "letter." << endl; // Show the first letter of the name.
cout << "It ends with " << name.back() << "letter." << endl; // Show the last letter of the name.
return 0;
}
但它不活跃,请给我帮助。非常感谢!