LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-05-2006, 07:12 PM   #1
sahel
LQ Newbie
 
Registered: Dec 2005
Posts: 21

Rep: Reputation: 15
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
 
Old 01-05-2006, 07:52 PM   #2
graemef
Senior Member
 
Registered: Nov 2005
Location: Hanoi
Distribution: Fedora 13, Ubuntu 10.04
Posts: 2,379

Rep: Reputation: 148Reputation: 148
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
syslog not opening named pipe. fluxrad Linux - Software 5 02-10-2009 05:31 AM
Planning to change root pass and oracle system pass sathyguy Red Hat 1 12-20-2005 09:53 PM
Transphering files over a remote named pipe breik Linux - Networking 1 10-02-2005 01:10 PM
connecting two vm machine via named pipe ? cyu021 Linux - Software 2 03-21-2005 07:01 PM
binutils 1 pass :: broken pipe (?) jayprakash Linux From Scratch 2 02-14-2005 05:21 PM


All times are GMT -5. The time now is 02:02 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration