Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

20
  • Isn't std::atomic only available in C++11? Commented Jun 17, 2015 at 14:59
  • @paul: Yes, but that's logical because C++03 didn't even have threads. Commented Jun 17, 2015 at 15:03
  • So how can I fix this problem if I'm using Visual C++ 2010, does Windows API provide a solution? Commented Jun 17, 2015 at 15:04
  • 1
    @paul: Use boost - the C++11 solution was directly derived from Boost. Once you upgrade to an up-to-date version of MSVC, you can probably replace using boost::atomic with using std::atomic. Commented Jun 17, 2015 at 15:07
  • What if I am only using C and Windows API threads, do you know how to solve this problem? Commented Jun 17, 2015 at 15:09