Sign in to follow this  

Sleep() not working

This topic is 3301 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi. I have started visual studio 2005 (in vista), and want to make a simple console app. I tried to use Sleep(1000) in it, but it says error C3861: 'Sleep': identifier not found. Then looking at msdn it is defined in "winbase.h". And including winbase spits out more than 73 errors. So question is how can I include winbase.h in my console application so that I can use Sleep() function. Any help will be appreciated. Regards Kazz #include "stdafx.h" #include "conio.h" //#include "winbase.h"//ERROR int _tmain(int argc, _TCHAR* argv[]) { _getche(); Sleep(1000);//ERROR return 0; }

Share this post


Link to post
Share on other sites
From the MSDN documentation:
Quote:

Minimum supported client Windows 2000 Professional
Minimum supported server Windows 2000 Server
Header Winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

Share this post


Link to post
Share on other sites

This topic is 3301 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this