LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   pass a string to a named pipe (https://www.linuxquestions.org/questions/programming-9/pass-a-string-to-a-named-pipe-400002/)

sahel 01-05-2006 07:12 PM

pass a string to a named pipe
 
If i want to pass a string into pipe what shall i do?
ex: i want to say
char e[10];
e="No user found" //I am not at all sure how to do this
write(t,e,strln(e));
thanks

graemef 01-05-2006 07:52 PM

Try

Code:

char e[]="No user found";
The compiler will then make sure that the array is defined with the right number of elements. (which is 14 - more than the 10 you had declared)

graeme.


All times are GMT -5. The time now is 03:49 AM.