Hi,
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++] = "64.106.11.123";
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?
Thank you