I need some help passing two variables to another program.
Code:
void create_process(char* prog_name, int userID, processID)
{
// code
// I need to convert the two int's to char to send them...??
execl(prog_name, prog_name, userID, processID,0);
}
//
int main(int argc, char *argv[])
{
int userID, processID;
// convert argv[0] into userID and argv[1] into processID
//code
}
From what I can figure out I need to convert userID and processID to char to be able to send then to another program and then I need to convert them back into int's again but I dont know how. Please help.