C++ program Access is denied [closed]

  access-denied, c++

I have started coding cpp since a week so I am a newbie in it. I have downloaded MinGW cpp compiler, and added it to the path. I used Cmder to run a hello world code,

#include <iostream>
using namespace std;

int main() {
    cout << "Hello World!";
    cout << "My first CPP program LOL";
    return 0;
}

Then I typed in cmder,

g++ HelloWorld.cpp -o outputfile.exe

Nothing shows, it means that g++ have converted the code to exe, but when i typed

outputfile.exe

2 to 3 seconds later, it comes as ‘Access is denied’ and cmder closes.
I am sick of it. Can you please help me finding the solution of this. I am the administrator of my pc.

Source: Windows Questions C++

LEAVE A COMMENT