Thread: how to make it stop

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    227

    how to make it stop

    im tring to make this not go away i want it only to go away when i press a button or something
    how can i make this possiable?

    #include <stdlib.h>
    #include <iostream.h>

    int main()
    {
    int x;

    time_t hold_time;
    hold_time=time(NULL);
    cout<<"\n"<<ctime(&hold_time);
    return 0;
    scanf("%i",&x);
    cout<<"good bye"<<x;
    exit(0);
    }

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    http://www.cprogramming.com/boardfaq.html#pause

    ... and you might want to think about the positioning of your "return 0" statement...
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    227
    what does return 0; actualy do?

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    From main() it exits your program and returns a completion status of 0 to the operating system, hence my suggestion that you review your somewhat mysterious choice of location!
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  5. #5
    Registered User
    Join Date
    Dec 2001
    Posts
    227
    hehe thanx man btw know any sitez were i can find tutorialz on how to creat simple gamez?

  6. #6
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    http://www.gamedev.net/

    Is very popular with game writer types.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  7. #7
    Registered User
    Join Date
    Dec 2001
    Posts
    227
    again thanx for helping! as you can see im a newbie at this... hehe

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Why does my prog just stop?
    By Queatrix in forum Windows Programming
    Replies: 4
    Last Post: 03-01-2006, 05:12 PM
  2. Win32 Common Controls in C++, how do i make and use them?
    By C+noob in forum Windows Programming
    Replies: 6
    Last Post: 01-09-2006, 11:53 AM
  3. want to make this small program...
    By psycho88 in forum C++ Programming
    Replies: 8
    Last Post: 11-30-2005, 02:05 AM
  4. 'functions' in make?
    By mart_man00 in forum C Programming
    Replies: 1
    Last Post: 06-21-2003, 02:16 PM
  5. Make Cortana Stop Kicking Me!!!???
    By drdroid in forum C++ Programming
    Replies: 6
    Last Post: 02-27-2003, 05:27 PM