
14 Nov
2010
14 Nov
'10
3:28 p.m.
On 13 November 2010 23:49, Claude <clros@tiscali.it> wrote:
Ok, I now make correctly my stream with:
stream<file_descriptor_source> in(file_descriptor_source(fp));
Sadly, that doesn't mean what you think it means. You've declared a function which takes a file_desciptor_source as a parameter. This is known as "C++'s most vexing parse", after an article about it in the book Effective C++. If you don't have that book, there's an article about it here: http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=439 The errors that you're getting should have the type of 'in' as a function, which is the clue. Also, if you use 'clang' it gives a helpful warning. Daniel