Hey there, all. I just complied a program in C++ on Microsoft Windows 7 Ultimate (MinGW). The only problem is that when I run it a command prompt also runs with it in the background, and can't figure out how to remove it. Any ideas?

Recommended Answers

The only way for us to understand your problem is for you to post your code.

Jump to Post

All 4 Replies

The only way for us to understand your problem is for you to post your code.

The only way for us to understand your problem is for you to post your code.

I think a better description of the problem would help -- not the code...

Put this at the beginning of main() to hide the window and include windows.h ShowWindow( GetConsoleWindow(), SW_HIDE);

I know this is old, but I'll post a solution and mark it solved. Compile with:

gcc -mwindows -c file.cpp -o file.exe

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.