Thread: bidirectional pipes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    perhaps you're not sending a '\0' at the end of the string the second time

  2. #2
    Registered User
    Join Date
    May 2011
    Posts
    116
    Quote Originally Posted by Elkvis View Post
    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
    Last edited by quo; 06-06-2012 at 08:02 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Bidirectional loop? (Increase/decrease depending on values)
    By BlueGooGames in forum C Programming
    Replies: 4
    Last Post: 01-08-2011, 12:08 PM
  2. 2 way pipes
    By ssharish2005 in forum C Programming
    Replies: 6
    Last Post: 10-25-2010, 04:21 AM
  3. pipes in c
    By ajal1 in forum C Programming
    Replies: 6
    Last Post: 10-29-2005, 03:29 PM
  4. pipes
    By moi in forum C Programming
    Replies: 8
    Last Post: 08-11-2004, 01:59 PM
  5. Need some help with pipes please.
    By carrja99 in forum C Programming
    Replies: 1
    Last Post: 05-05-2004, 04:13 PM