1

I used dev-cpp to compile a simple HelloWorld program it compiles and links but doesn't run. A process appears in my TaskManager which uses 100Kb of memory and can't be killed (not even with "End Task") but the Windows doesn't tell me why.

Also I tried to run a HelloWorld program compiled by a friend of mine on VS C++ but same problem. The HelloWorld program works great on his computer. The problem is not related with console apps because I tried to run a Windows GUI program compiled on my friend's computer using VS C++ that also works great on his computer but the same problem on my.

What could cause the problem?

The source code of my HelloWorld program:

#include <iostream>

using namespace std;

int main()
{
    cout << "Hello World!" << endl;
    system("pause");
    return 0;
}
Pinte Laurentiu
  • 43
  • 3
  • 12
  • 1
    Strange problem, does your program expect user input? Can you show the source code? – oLen Nov 20 '15 at 12:51
  • No the program does not expect user input, and i don't think that the problem is related to the code or the compiler because the GUI program compiled with VS c++ doesn't work either. – Pinte Laurentiu Nov 20 '15 at 13:02
  • 1
    We have be getting questions like this a lot lately. It could be your antivirus. see http://stackoverflow.com/questions/33690697/running-my-c-code-in-visual-studio-gives-me-a-blank-cmd – NathanOliver Nov 20 '15 at 13:05
  • I know that there are others IDEs like Eclipse and i runned the program without system("pause"); and the program still doesn't start the process still appears i still can't close it and it uses exactly 100k of memory right if i try to make it use up the memory. – Pinte Laurentiu Nov 20 '15 at 13:11
  • @NathanOliver you were right it is because i use Avast please post your comment as an answer so i can close the question! – Pinte Laurentiu Nov 20 '15 at 13:37
  • @PinteLaurentiu I closed the question as a duplicate to mark that it is already answered. – NathanOliver Nov 20 '15 at 13:39

0 Answers0