Thread: seriously simple question here

  1. #1
    Registered User
    Join Date
    Jul 2002
    Posts
    3

    Unhappy seriously simple question here

    okay, maybe this is dumb but I just got started doing c++ console apps and it's going good, but how do you see out output?! I run a program and as soon as I enter data, the program ends and I can't see my output not to mention the rest of my programs. What am I overlooking here??

  2. #2
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823

  3. #3
    PC Fixer-Upper Waldo2k2's Avatar
    Join Date
    May 2002
    Posts
    2,001
    Code:
    #include <conio.h>
    
    ...
    cin>>whatever;
    cout<<whatever<<endl;
    getch();
    //getch waits for the user to press "any key" (where's the any key?)
    this may not be what you're looking for so post your code or at least the part giving you trouble
    PHP and XML
    Let's talk about SAX

  4. #4
    Registered User
    Join Date
    Jul 2002
    Posts
    3
    thanx Waldo T'aint exactly what I need, but it's close and gives me a lot of ideas mmwwaahahaha!

  5. #5
    Seven years? civix's Avatar
    Join Date
    Jul 2002
    Posts
    605
    you can also add system("PAUSE"); but if you do, you need to include windows.h
    .

  6. #6
    Registered User
    Join Date
    Jul 2002
    Posts
    3
    aaahh! 1000 Thanks to most wise Civix for enlightening young Gravy!

  7. #7
    Seven years? civix's Avatar
    Join Date
    Jul 2002
    Posts
    605
    no problem, gravy....
    .

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simple question regarding variables
    By Flakster in forum C++ Programming
    Replies: 10
    Last Post: 05-18-2005, 08:10 PM
  2. Simple class question
    By 99atlantic in forum C++ Programming
    Replies: 6
    Last Post: 04-20-2005, 11:41 PM
  3. Simple question about pausing program
    By Noid in forum C Programming
    Replies: 14
    Last Post: 04-02-2005, 09:46 AM
  4. simple question.
    By InvariantLoop in forum Windows Programming
    Replies: 4
    Last Post: 01-31-2005, 12:15 PM
  5. simple fgets question
    By theweirdo in forum C Programming
    Replies: 7
    Last Post: 01-27-2002, 06:58 PM