for your first question about the for loop: it should be (int cnt=1; cnt > NR_JOBS; cnt++); because you are comparing your counter variable with the constant.
calling functions with more than one variable should be done in the order in which your function's signature has been set up, ie.
Language: C++
int myFunction (int param1, float param2)
{
//whatever you want to do
return anyInt; //a function returns something, an int in this case, do not leave this out
}
to call myFunction, you would say
Language: C++
myFunction(anIntVar, aFloatVar);
it has to be in the order, you can't mix them up... it won't work
if you want to call your float first then your function declaration should change
Language: C++
int myFunction (float param2, int param1)