Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 21st, 2008, 1:18 AM   #1
sachin
Newbie
 
Join Date: Nov 2008
Posts: 18
Rep Power: 0 sachin is an unknown quantity at this point
Cool sleep command

plz give an example which uses sleep command.....
sachin is offline   Reply With Quote
Old Nov 21st, 2008, 2:30 AM   #2
Klarre
Game engine designer
 
Klarre's Avatar
 
Join Date: May 2005
Location: Sweden
Posts: 349
Rep Power: 10 Klarre is on a distinguished road
Re: sleep command

#include <Windows.h>

int main() { Sleep(1000); return 0; }
__________________
http://klarre.se/
Klarre is offline   Reply With Quote
Old Dec 4th, 2008, 5:11 AM   #3
sachin
Newbie
 
Join Date: Nov 2008
Posts: 18
Rep Power: 0 sachin is an unknown quantity at this point
Re: sleep command

plz make me more clear....by giving the output.........
sachin is offline   Reply With Quote
Old Dec 4th, 2008, 5:22 AM   #4
Freaky Chris
Expert Programmer
 
Freaky Chris's Avatar
 
Join Date: Dec 2007
Location: England
Posts: 771
Rep Power: 7 Freaky Chris is on a distinguished road
Send a message via MSN to Freaky Chris
Re: sleep command

Sleep() doesn't have an output, Sleep() pause the exectution of the program for the given number of milli seconds

http://www.google.co.uk/url?q=http:/...pvffG-Sr_MbYcA

Chris
__________________
Steven Skiena - Algorithms

,[->+>+<<]>>[-<<+>>]>++++++++[-<++++++++>]<+[-<->]>+<<[[-]+++++++++++++++.[-]>]>>[+++++++++.[-]],
brainf**k -- It's such a pretty language
Freaky Chris is offline   Reply With Quote
Old Dec 4th, 2008, 9:22 AM   #5
Nebula
The X God
 
Nebula's Avatar
 
Join Date: Oct 2005
Posts: 225
Rep Power: 9 Nebula is on a distinguished road
Send a message via AIM to Nebula Send a message via MSN to Nebula
Re: sleep command

#include<sleep.h>

int sleep(leftSide, Face){
Sleep(10);
std::cout << "zZz";
}
__________________
When will Jesus bring the porkchops?
Nebula is offline   Reply With Quote
Old Dec 5th, 2008, 6:09 AM   #6
magnus.therning
Hobbyist Programmer
 
magnus.therning's Avatar
 
Join Date: May 2006
Location: Gothenburg, Sweden
Posts: 113
Rep Power: 9 magnus.therning is on a distinguished road
Re: sleep command

Quote:
Originally Posted by Nebula View Post
#include<sleep.h>

int sleep(leftSide, Face){
Sleep(10);
std::cout << "zZz";
}
Seriously, you'd have to swap the last two lines otherwise it doesn't make sense and the poor chap would lose points on his homework.

c++ Syntax (Toggle Plain Text)
  1. #include<sleep.h>
  2.  
  3. int sleep(leftSide, Face){
  4. std::cout << "zZz" << std::endl;
  5. Sleep(10);
  6. }
__________________
Don't comment bad code - rewrite it.
- The Elements of Programming Style (Kernighan & Plaugher)
magnus.therning is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
C Command Reference Schilcote C 3 Nov 12th, 2008 7:16 PM
Trying to pipe output system command results directly into a variable VernonDozier C++ 5 Jan 6th, 2008 2:39 AM
Command Prompt SkyPioneer Coder's Corner Lounge 5 May 3rd, 2006 10:07 PM
A simple script to execute a command package satimis Bash / Shell Scripting 3 Aug 12th, 2005 11:28 PM
system () command in Borland C++ Bldr. 4 L7Sqr C++ 14 Jun 18th, 2005 8:15 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:37 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC