Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    May 2011
    Posts
    44
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Running multiple threads in C++

    I need to run a loop for 1 million iteration for which I need to construct multiple threads to work on it. Kindly guide me to run multiple threads in VC++ win32 console applications.
    Windows Web Hosting Package Backed by 14 years Windows Hosting Experience
    Unlimited Reseller Hosting

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    There are different options you can use for implementing threading. In your case you might want to use the Windows API.
    http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx

    There are other options though depending upon your needs and requirements. At work we typically use pthreads because we develop on both Windows and Unix based platforms.
    https://computing.llnl.gov/tutorials/pthreads/
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •