Boost logo

Boost :

Subject: [boost] Standard stream from C fopen()
From: Claude (clros_at_[hidden])
Date: 2010-11-12 12:32:27


I Use this code for make a standard stream from a C fopen() FILE* :

    FILE *fd = fopen("Prova", "w");
        if (fd)
          // io::stream_buffer<io::file_descriptor_source> fpstream
          //std::istream in (&fpstream);

        istream in = boost::iostreams::file_descriptor(fileno(fd));

But I obtain an error (G++ on Linux Ubuntu):

error: conversion from ‘boost::iostreams::file_descriptor’ to non-scalar
type ‘std::istream’ requested|
error: call of overloaded ‘path(const int&)’ is ambiguous|

What is the correct method?

View this message in context:
Sent from the Boost - Dev mailing list archive at

Boost list run by bdawes at, gregod at, cpdaniel at, john at