Originally Posted by
Elkvis
perhaps you're not sending a '\0' at the end of the string the second time
Actually in the parent code and out of the loop I have:
Code:
char *s;
s = new char[LINESIZE];
and inside the loop s is allocated :
Code:
//sss() returns a char*
s = sss();
How can I check that?And if that so ,why does it work when the for-loop doesn't exist?Because with or without the loop the function sss()
returns a char*,so if it was for that then it shouldn't be working at all.right?
I also have to say that not only the parent has a loop but also the child's getline is in a loop in order to receive data more than once