Author Topic: console window won't pop up  (Read 3818 times)

Offline master030

  • Single posting newcomer
  • *
  • Posts: 2
console window won't pop up
« on: May 29, 2012, 05:31:07 pm »
Hey guys,
I am new to codeblock, I just installed the  codeblock on windows7 (mingw..using GNU cc Compiler).
Installation went well .. I then created a project...I  build the default main.cpp file that comes with a new project... no errors found but no console window shows up.  
I checked Properties--> build : everything is selected(compile/link/debug/release).
I even tried to press F9.
No console window.

I need help .. thanks

zabzonk

  • Guest
Re: console window won't pop up
« Reply #1 on: May 29, 2012, 07:09:12 pm »
What kind of project did you create? You want a "Console Application" project.

Offline master030

  • Single posting newcomer
  • *
  • Posts: 2
Re: console window won't pop up
« Reply #2 on: May 30, 2012, 12:25:56 am »
Yes, I created a console application.

This is what the code looks like:
#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    cin.get();
    return 0;
}


This is what 've done so far to fix it.   I read somewhere that adding "cin.get(); "  one line before "return 0" should fix it.
This didn't resolve anything, so what I did is, I ran the project.exe file in the "bin" folder of the project and my AVG anti-virus alert window came up and saying that project.exe is a trojan.

I tried again and I got a window message telling me that I do not have right access to project.exe.

Very strange.

Offline ouch

  • Almost regular
  • **
  • Posts: 223
Re: console window won't pop up
« Reply #3 on: June 08, 2012, 12:04:21 am »
Why do you have a poll for this thread?

Anyway... It sounds like you don't have permission to access the file. This is because you either created your project outside of your user space, or your anti-virus is blocking you.