programs are not showing!

This is a discussion on programs are not showing! within the C++ Programming forums, part of the General Programming Boards category; Yeah the OP was cryptic with his 'make the window show' terminology. Although I'm using dev c++ on xp and ...

  1. #16
    Super Moderater.
    Join Date
    Jan 2005
    Posts
    374
    Yeah the OP was cryptic with his 'make the window show' terminology.

    Although I'm using dev c++ on xp and I'm wondering where these came from.

    or this one when using getch();

    implicit declaration of function `int getchar(...)

  2. #17
    Registered User
    Join Date
    Jan 2005
    Posts
    7,344
    I don't think the OP was cryptic at all. It seemed obvious that the problem was not about stopping the console window from disappearing. The original post was about as good as you can expect from someone confused about console vs. windows programming. It is just that so many people have the problem addressed in the FAQ that it is easy to assume that is the issue here.

    >> is there any way to change that to a normal Windows XP window without making it a windows application?
    Not that I know of. But console applications and windows applications are really different concepts. If you are learning a language and learning programming in general, then the console application should be sufficient for your needs even if it is not pretty. If you are trying to make a specific type of program that has a nicer looking interface than the MS-Dos style console window, then you can add code to your windows example to get what you want.

  3. #18
    Super Moderater.
    Join Date
    Jan 2005
    Posts
    374
    It seemed obvious that the problem was not about stopping the console window from disappearing
    I'd beg to disagree. The OP posted code that was for the console only, which had nothing to do with windows programming. Leading one to believe he was experiencing problems with the console.

    And I've known people who use, Xp and Dev c++ where cin.get() does not work. Even if they use it twice or add a few ignore()s at the end.

    However, this discussion is trivial, it was a simple case of misunderstanding.

    Perhaps you're less intoxicated then I am at this present moment in time too.


  4. #19
    Registered User
    Join Date
    Dec 2005
    Posts
    4
    ok then, i will learn in console application and switch to windows application when ever i need to create a real programm assuming that the main code structure does not change from Console to Windows, is that correct?

    Thanks again

  5. #20
    Registered User
    Join Date
    Jan 2005
    Posts
    7,344
    All the code you use for outputting to the console and getting information from the user should be separated from the code that does the processing of that information. Doing so will be good practice in proper program design, and it will make it easier for you to use the same code in a Windows application later.

    Depending on your skill level and knowledge, that might mean writing a function that outputs to the screen and a function that requests information from the user, or it might mean writing classes that encapsulate that process and provide an interface to the input and output. However you do it, you want to separate the code that does the input and output from the code that uses it.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 07:32 AM
  2. How come Dev C++ cant run some programs??
    By Sephiroth in forum C Programming
    Replies: 41
    Last Post: 09-17-2005, 06:35 AM
  3. Way to get the current open programs displayed?
    By CPPguy1111 in forum C++ Programming
    Replies: 6
    Last Post: 06-22-2005, 01:24 AM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 04:12 AM

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