4

Before I start I want to explain that I am a novice and that it's highly possible that I've missed something simple or that there's something simple that I just don't know about.

Using visual studio I wanted to get a bit of threading practice in but I can't get it to include at the top of my code. I know that is new to C++11 but I'm not sure if that's enabled for Visual Studio 2010 or if it isn't I'm not sure how I would go about doing that.

Here is a screenshot of my code:

My Code

0

1 Answer 1

11

You cannot: C++11's Thread support library is not supported by the implementation of the C++ Standard Library shipped with VS2010. You should upgrade to VS2012 if you want to use it.

Alternatively, you could use Boost.Thread, which served as an inspiration for C++11's Standard Thread support library.

As a further option, you could consider purchasing the Just.Thread library, which provides a complete implementation and is available for VS2010 as well.

Sign up to request clarification or add additional context in comments.

2 Comments

Ah thank you. I've been learning the SMFL and they have an implementation of threads but they said to use C++11 if you can. So I'll just learn theirs. Thanks again!
@JosephLittle: note that there is a free version of VS2012 available, so upgrading (and using C++11 threads) should be very straightforward :)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.