-1

I cant get access to anything except VS2010.

Is there a way I can still write a basic multithreaded application, simply calling a simple function? I am aware about Boost and C++11 but I do not have access to these.

I did find this:

Multithreading in c++

but I'm not sure if that would work in my scenario?

Community
  • 1
  • 1
intrigued_66
  • 16,082
  • 51
  • 118
  • 189
  • Have you tried anything? The accepted answer on the question you referenced for example? That answer is about as simple an example as you will get. – Chad Apr 02 '12 at 14:24
  • suggest using pthreads but this thread may make it simpler for you to decide `http://stackoverflow.com/questions/2403536/pthreads-in-visual-c` – keety Apr 02 '12 at 14:25
  • You should accept an answer, by the way :) it's been a while, and you have been active on your account – Tqn Jul 08 '14 at 05:59
  • There's a simple example provided in the first answer to the post you linked. Wouldn't trying it tell you if it works in your scenario faster than posting here and waiting for answers? – Ken White Dec 21 '16 at 03:33

2 Answers2

0

It sounds like you are new to multithreading, so the best way to start with may be using OpenMP. It allows you - in many cases - to simply add pragma statements to your code that provide the multithreading. It is easier to use that managing threads explicitly. See here: OpenMP documentation for VS2010

Lubo Antonov
  • 2,301
  • 14
  • 18
0

What you have found will perfectly work for you, if your code suppose to run under windows control (I assume yes, cause you're using VS).

Zilog
  • 468
  • 3
  • 7