Command Promt showing in window programming - Compiler dependent?

This is a discussion on Command Promt showing in window programming - Compiler dependent? within the C++ Programming forums, part of the General Programming Boards category; Hello, New user here. I had a good look around, both around this site and elsewhere, but can't seem to ...

  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    2

    Unhappy Command Promt showing in window programming - Compiler dependent?

    Hello,

    New user here. I had a good look around, both around this site and elsewhere, but can't seem to come to an answer.

    When creating a simple window, why would the command prompt still show 'behind' or rather along it? I've had a look at various examples' .cpp files and .exe files and it would seem that when I compile, the command prompt is there, yet in the provided original .exe it isn't.

    Although I'm somewhat new to C++, I wouldn't fully classify myself as a total beginner as I do have previous knowledge and experience with other languages, so I'm pretty much flying through this stuff(Among other sources, tutorials on this site - They are really amazing!), and as such, I'm a little worried that it's a setting or two within a compiler(Or compiler's built in behavior to begin with) that does this.

    I'm mostly using Dev-C++, although when I tried it with some other ones such as Code::Blocks, Borland, etc, the result is the same. Am I missing something?

  2. #2
    Registered User
    Join Date
    May 2010
    Posts
    2,804
    If you are running from the IDE this is probably normal. It might be the IDE calling the command prompt. Does this happen if you run the program from the Windows "Run a program" or the command line?

    Jim

  3. #3
    Registered User
    Join Date
    Oct 2010
    Posts
    2
    Quote Originally Posted by jimblumberg View Post
    If you are running from the IDE this is probably normal. It might be the IDE calling the command prompt. Does this happen if you run the program from the Windows "Run a program" or the command line?

    Jim
    I run it by launching the exe. Same happens when going through the compilers' "Compile and Show" feature. However I launch it happens.

    I do recall playing around with Microsoft Visual C++ a few years back, and this would indeed *not* happen...so you may be onto something here.

  4. #4
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,790
    The whole "command prompt showing" is usually a flag in the executable header. So you might say it depends on the compiler, but that's not the whole story. You have to explicitly tell the compiler what kind of application you want. Do you want it to show this cmd prompt or not? You would have to specifically check your compiler's/IDE's documentation to find how to do this.
    So it really has nothing to do with the code.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. internet
    By yeah in forum C Programming
    Replies: 16
    Last Post: 02-12-2005, 09:37 PM
  2. input/output
    By dogbert234 in forum Windows Programming
    Replies: 11
    Last Post: 01-26-2005, 05:57 AM
  3. Showing a window from inside a DLL
    By Rare177 in forum Windows Programming
    Replies: 0
    Last Post: 10-08-2004, 11:39 AM
  4. Window not showing
    By Rare177 in forum Windows Programming
    Replies: 7
    Last Post: 06-25-2004, 05:38 AM
  5. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21