0

我正在使用带有 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;

}

但它不活跃,请给我帮助。非常感谢!

4

2 回答 2

1

我的问题解决了!

我想念 Visual C++ Redistributable 2008 和 2010。

版主请关闭我的话题。谢谢!

于 2017-07-13T06:38:01.877 回答
0

导航到C:\Program Files (x86)\Notepad++鼠标右键单击 Notpad++.exe 文件单击属性并在兼容性选项卡下 UN-TICK 以管理员身份运行程序框完成。请参阅此链接

于 2017-07-13T05:52:30.273 回答