Sleep in .net

  • Thread starter Thread starter --== Alain ==--
  • Start date Start date
A

--== Alain ==--

Hi,

under visual C++ exists a function Sleep(millisecond).
What is the equivalent under Visual C++.Net ?

thx,

Alain
 
Sleep(millisecond) !!

Nothing stops you from using this under C++/CLI.

For strictly managed code, check out Thread::Sleep().


Brian
 
ok, but when i use it, VC++.net tells me : error C3861: 'Sleep':
identifier not found.

and if i include windows.h, i have several command which are ambigious...
 
Try ::Sleep()

Brian

--== Alain ==-- said:
ok, but when i use it, VC++.net tells me : error C3861: 'Sleep':
identifier not found.

and if i include windows.h, i have several command which are ambigious...
 
Hi Alain,

--== Alain ==-- said:
ok, but when i use it, VC++.net tells me : error C3861: 'Sleep':
identifier not found.

and if i include windows.h, i have several command which are ambigious...

If you have ambigious types try to remove using statements and use the full
qualified types in your code.

So instead of:

using A::B::C;
D d; // D lives in the above namespace and in some other visible namespace
as well

use:

A::B::C::D d;
 
Back
Top