News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

console window won't pop up

Started by master030, May 29, 2012, 05:31:07 PM

Previous topic - Next topic

master030

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

What kind of project did you create? You want a "Console Application" project.

master030

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.

ouch

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.