i am using visual c++ 2010 can i run this code?
what should i add to visual studio?
i am using visual c++ 2010 can i run this code?
what should i add to visual studio?
Visual C++ 2010 does not provide the C++0x thread support or atomics libraries.
If you want to use that code in Visual C++ 2010, you'll need to use a third-party implementation of those libraries. One option is just::thread; it's not free, but I have a copy and am quite pleased with it.
Alternatively, you can use another cross-platform threads library like Boost.Thread or OpenThreads or one of the native Windows threads libraries. Any of these options will probably require changes to the code in order to run.
VC++ supports special embedded syntax OpenMP (http://msdn.microsoft.com/en-us/library/tt15eb9t(VS.80).aspx) - note, that g++ is also suports it, so you can get cross platform code.