LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 10-07-2015, 11:55 AM   #1
YehudaSinger
Member
 
Registered: Jun 2013
Posts: 30

Rep: Reputation: Disabled
PIpe manipulation in a fifo.h file


Dear Sir/Mrs.

I want to replace the FIFO which is declared in an h file like that:
template <class T>
inline T
fifo: read by the following:
1. I created an unamed pipe using pipe(fd) where df is int fd[2].
2. The original read is fifo<T>::read {... }
3. I replaced the code with:
ssize_t ret_code ;
ret_code = read ( fd[0], ( void*) message, (size_t *) sizeof (message)) ;

I get the compilation error: invalid arguments. Candidates are void read(#0 &) #0 read()'

Configuration:
1. OS: Red Hat 6.4
2. C/C++ using GNU.
3. development platform: Eclipse
How to overcome this problem?
Thanks in advance.
Yehuda

Last edited by YehudaSinger; 10-08-2015 at 01:17 AM. Reason: More details
 
Old 10-08-2015, 12:00 AM   #2
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,863
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
Dear Sir/Madame!

Please read this topic first: http://www.linuxquestions.org/questi...gs-4175464257/

It also explains how to use [code] and [/code] tags.

When quoting source code or compiler-messages, always quote complete lines without any editing.

Last edited by NevemTeve; 10-08-2015 at 03:27 AM. Reason: complete lines, not fregments
 
1 members found this post helpful.
Old 10-08-2015, 01:18 AM   #3
YehudaSinger
Member
 
Registered: Jun 2013
Posts: 30

Original Poster
Rep: Reputation: Disabled
Dear NevemTeve
I revised the post following your recommendations.

Best regards,
Yehuda
 
  


Reply



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
Control vlc via linux fifo (pipe) macey Linux - General 3 07-02-2014 08:16 AM
pipe, FIFO qrange Linux - Software 4 07-16-2012 10:08 AM
What is meaning that a file is a named pipe (FIFO)? mei0fei Linux - Newbie 2 07-12-2011 06:48 AM
[SOLVED] How to handle a broken pipe exception (SIGPIPE) in FIFO pipe? zyroot998 Programming 5 03-03-2011 08:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:39 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration