Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8067135
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T12:11:27+00:00 2026-06-05T12:11:27+00:00

I would greatly appreciate any help here. I am trying to call a function

  • 0

I would greatly appreciate any help here. I am trying to call a function asynchronously with Boost::Thread, but I am getting some errors. This is my real code.

In main:

vector<std::string> a = ...;
vector<std::string> b = ...;
vector<boost::thread> threads;

threads.push_back(boost::thread(do_work, an_integer, a[i], b.begin(), b.end()));

// Later I will join()...

Elsewhere:

void do_work(int i, std::string a_string, vector<string>::iterator begin, vector<string>::iterator end)
{
    // Some stuff
}

I am quite new to this stuff, being much more used to C#. Anyway, these are the errors I am getting:

error C2664: 'void (int,std::string,std::_Vector_iterator<_Myvec>,std::_Vector_iterator<_Myvec>)' : cannot convert parameter 1 from 'std::_Vector_iterator<_Myvec>' to 'int'

error C2664: 'void (int,std::string,std::_Vector_iterator<_Myvec>,std::_Vector_iterator<_Myvec>)' : cannot convert parameter 3 from 'std::basic_string<_Elem,_Traits,_Ax>' to 'std::_Vector_iterator<_Myvec>'

error C2664: 'void (int,std::string,std::_Vector_iterator<_Myvec>,std::_Vector_iterator<_Myvec>)' : cannot convert parameter 4 from 'std::_Vector_iterator<_Myvec>' to 'std::_Vector_iterator<_Myvec>'

I would greatly appreciate any help you could offer. I am almost certainly doing something extremely inane! Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T12:11:29+00:00Added an answer on June 5, 2026 at 12:11 pm

    That compiler error says that b.begin() and b.end() are different types, which clearly can’t be in the code you’ve listed. Recheck your code to make sure you haven’t defined b to be something else. (Also check an_integer since the compiler believes it’s an iterator.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Any help here would be greatly appreciated. I have this table hospital Nurse |
I'm trying to make a navigation for my website and would greatly appreciate any
Would greatly appreciate any help with this. I'm running two mysql_query 's to retrieve
I would greatly appreciate if you could help me with this in Java. Given
I am new to writing SQL and would greatly appreciate help on this problem.
I'm new to C++ programming and would greatly appreciate replies that don't assume much
I see similar answers here but none are what I need. I am trying
I'm trying to write a function that will load some xts data into R
I need some help, I am trying to create a very simple jquery slider..
I'm trying to load a jqGrid from json data made via a REST call.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.