
16 Feb
2006
16 Feb
'06
12:20 p.m.
Meryl Silverburgh wrote:
Thanks how can I call a function with 2 more parameters, like this: How can I pass 'param1', 'param2' to the fuction doStuff?
void A::aFunction( float param1, float param2) {
vector<int> aVector; aVector.push_back(1); aVector.push_back(2); aVector.push_back(3); aVector.push_back(4);
// want to loop thru the list and call A::print(int i, float param1, float param2)?
for_each( aVector.begin(), aVector.end(), bind( &A::doStuff, this, _1, param1, param2 ) );
}
void A::doStuff(int i, float param1, float param2) {
}