Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 09-05-2002, 02:25 AM   #1 (permalink)
Blaqb0x
Registered User
 
Blaqb0x's Avatar
 
Join Date: Jun 2002
Posts: 3
Blaqb0x is on a distinguished road
halt after execution

What's the command to halt an app after execution.

system(PAUSE);

doesn't work.

thanx,
Blaqb0x is offline   Reply With Quote
Old 09-05-2002, 04:37 AM   #2 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,710
redhead is on a distinguished road
sleep(seconds);
Or if you're looking for something shorter
usleep() or nanosleep().
If its a complete halt, then do a:
cin >> temp;

It will wait till the user presses <enter>
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 09-07-2002, 02:37 AM   #3 (permalink)
abc123
bloomberg
 
abc123's Avatar
 
Join Date: Jun 2002
Location: bloomberg
Posts: 263
abc123 is on a distinguished road
Send a message via AIM to abc123 Send a message via Yahoo to abc123
ur prob is "system(PAUSE)" is wrong
it is sposed to be:
Code:
system("pause");
and also you need to include <cstdlib>

Code:
#include <cstdlib>
using namespace std;

int main()
{
cout << "yup";
system("pause");
|
that'll work.
__________________
-- bloomberg.
abc123 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Execution moremonks Standard C, C++ 3 06-10-2003 08:01 AM


All times are GMT -8. The time now is 08:18 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting