GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 16-Jun-2006, 22:13
samananaconda samananaconda is offline
New Member
 
Join Date: Jun 2006
Posts: 1
samananaconda is on a distinguished road

delay() or sleep() function in Win32 Console Application


Hi,

How can I use delay function in my program? (Vc++6 Win32 Console Application)

This is sample code
----------------------------------------------------------------------
CPP / C++ / C Code:
#include "stdafx.h"
#include <iostream>
#include "conio.h"


int main(int argc, char* argv[])
{

/* delay(1000);  fatal error C1852: 'Debug/contorolerISB.pch' is not a valid precompiled header file
Error executing cl.exe.*/


return 0;
}
Last edited by admin : 01-Apr-2007 at 04:12. Reason: Please surround your C++ code with [c++] ... [/c++]
  #2  
Old 17-Jun-2006, 05:47
aie0 aie0 is offline
Member
 
Join Date: Dec 2004
Posts: 246
aie0 is a jewel in the roughaie0 is a jewel in the rough

Re: delay() or sleep() function in Win32 Console Application


CPP / C++ / C Code:
#include <time.h>
 
void sleep(unsigned int mseconds)
{
    clock_t goal = mseconds + clock();
    while (goal > clock());
}
 
 

Recent GIDBlogProblems with the Navy (Enlisted) by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB 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
[Include] Doubly-linked List dsmith C Programming Language 6 14-Apr-2006 13:12
convert win32 console application to win32 application jaro C Programming Language 3 17-Nov-2005 02:35
Bloodshed Dev C++ Project Options JdS C++ Forum 6 11-Nov-2005 17:23
Help! Some basal questions about MFC xutingnjupt MS Visual C++ / MFC Forum 1 05-Dec-2004 03:38
Revising Script style ?????? pepee MySQL / PHP Forum 4 14-Apr-2004 04:59

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 08:26.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.