I have a wired problem. I try to build a argv array which will be passed to ssh command.
The following line works perfectly:
argv[n++] = "18.104.22.168";
But when I try to get the IP address out of a string which contains it, it will add me a line break after that argument.
argv[n++] = (char*)workerIp.c_str();
I even tried the data() method instead of c_str(), but it gives the same problem.
Could you tell me what is the difference between the first and the second/third line?
What I am doing wrong?
Edited 6 Years Ago by wyssen: n/a