🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.os.linux.programowanie
Article #244

Re: stream (fdopen)

#244
From: Cezary H. Noweta
Date: Thu, 09 Sep 1999 16:25
31 lines
1664 bytes
Witam,

Kamil Jonca wrote: 
> Czy jest konstruktor/metoda dla strumieni w c++ która pozwalałaby się
> podpiąć do deskryptora ? (Coś jak fdopen)
> Ew. może być podpięcie się do FILE*

  fstream::fstream(int fd);
  fstream::attach(int fd);

Do int fd:

  fstream f(fd);
lub
  fs.attach(fd);

Do FILE *f: /* ANSI C nie obejmuje fileno(...) */

  fstream fs(fileno(f));
lub
  fs.attach(fileno(f));

Klasa fstream jest potomkiem iostream (odpowiednio ofstream - ostream,
ifstream - istream).

  -- pozdrawiam

-- 
Cezary H. Noweta                 90-237 LODZ, ul. J.Matejki 34/38 POLAND
(chncc@irys.usun.drugiitrzeciczlon.uni.lodz.pl)  +48 42 6356013, 6356012
University of Lodz - Main Library                            fax 6781678
Technical Details
Message-ID: <37D7DF78.56E51323@irys.usun.drugiitrzeciczlon.uni.lodz.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!news.man.poznan.pl!news.man.lodz.pl!not-for-mail
References: <slrn7tfi8e.ti5.kjonca@kjonca.kjonca.bogus>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!news.man.poznan.pl!news.man.lodz.pl!not-for-mail
From: "Cezary H. Noweta" <chncc@irys.usun.drugiitrzeciczlon.uni.lodz.pl>
Newsgroups: pl.comp.os.linux.programowanie
Subject: Re: stream (fdopen)
Date: Thu, 09 Sep 1999 18:25:28 +0200
Organization: Biblioteka Uniwesytecka w Lodzi
Lines: 31
Message-ID: <37D7DF78.56E51323@irys.usun.drugiitrzeciczlon.uni.lodz.pl>
References: <slrn7tfi8e.ti5.kjonca@kjonca.kjonca.bogus>
NNTP-Posting-Host: chncc.lib.uni.lodz.pl
Mime-Version: 1.0
X-Trace: kujawiak.man.lodz.pl 936894250 23578 212.191.71.33 (9 Sep 1999 16:24:10 GMT)
X-Complaints-To: abuse@man.lodz.pl
NNTP-Posting-Date: 9 Sep 1999 16:24:10 GMT
X-Mailer: Mozilla 4.61 [en] (Win95; I)
X-Accept-Language: pl,en
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit