I need to download the header file <unistd.h>. I cannot find one on the internet, also I copy and pasted code from here into a new header file I named unistd.h (within Visual Studio), and it still reports that unistd.h does not exist.
I'm converting a project of mine from Windows-only to multi-platform compatability. In essence, I'm using the Windows Sleep function in a project, and I require the project to be compatible with Mac, Linux etc. The new function I'm using requires the unistd.h header file.
You could either use a portable version of that function (std::this_thread::sleep_for() for C++11 compilers, boost::this_thread::sleep() for C++98 compilers), or use #ifdef/#endif to select the correct OS-specific function for each platform you're supporting.
2010 Express supports a lot of C++11, but not this part. VC11 preview documentation said it supported that part as well, but I haven't tried it.
For 2010 Express, I download boost from www.boostpro.com and use it just like that: boost::this_thread::sleep(boost::posix_time::seconds(1)); for example.