Hi,

On 03.06.2012 22:11, Jamie Lahowetz wrote:
I am trying to pass two arguments to a boost thread using this call:
boost::thread workerthread(&SshClient::SSHconnect,&sshclt,1,provec);

the method for SSHconnect is:
int SSHconnect(int,vector<string>);

You will have to use boost::bind to bind the instance and additional arguments to your thread.
See for example http://blog.emptycrate.com/node/277.

Seemingly, what you originally wanted to use was the thread constructor with arguments. However, notice that it actually will create a copy of your object, which is not what you want.
You will want to use bind with pointer to members. So _this_ will refer to your object inside the newly created thread.

Regards,

Robert