🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.lang.learn.c-c++
Article #841

Re: Help getFileHandle()

#841
From: Paul paulcr
Date: Fri, 29 Nov 2002 01:52
27 lines
2147 bytes
Maya <escalante@canada.com> wrote in message
news:pan.2002.11.26.22.48.05.391738@canada.com...
> Opening and closing files is such a routine that I want to write a class
> that will handle the opening and closing of files, and I have already done
> most of the work. My problems is when I want to get the file handle, I
> don't know how to do this, exactly. Below is the part of the class that is
> causing the problem
>
>    class FileIO
>    {
>       public:
>          // file modes
>          ios::openmode RW_OPEN_BIN;
>       private:
>          std::fstream f;
>          std::string file_name;
>          ios::openmode mode;
>          fileprot permission;
>
>       public:
>          FileIO();
>          ~FileIO();
>
Would you not be better to create a constructor which took at least a
filename as a parameter?
<runs for cover>
Technical Details
Message-ID: <as6h8a$2gi$1@newsg2.svr.pol.co.uk>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newspeer.clara.net!news.clara.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news.theplanet.net!not-for-mail
References: <pan.2002.11.26.22.48.05.391738@canada.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114592,cc989fe1e1d8a53f
X-Google-Attributes: gid114592,public
X-Google-Thread: 10ba33,cc989fe1e1d8a53f
X-Google-Attributes: gid10ba33,public
X-Google-Thread: 109fba,cc989fe1e1d8a53f
X-Google-Attributes: gid109fba,public
X-Google-ArrivalTime: 2002-11-28 17:52:11 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newspeer.clara.net!news.clara.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!news.theplanet.net!not-for-mail
From: "Paul" <paulcr<nospambots>@noplacespecial.fsworld.co.uk>
Newsgroups: alt.comp.lang.learn.c-c++,comp.lang.c++,gnu.g++.help
Subject: Re: Help getFileHandle()
Date: Fri, 29 Nov 2002 01:52:15 -0000
Lines: 30
Message-ID: <as6h8a$2gi$1@newsg2.svr.pol.co.uk>
References: <pan.2002.11.26.22.48.05.391738@canada.com>
NNTP-Posting-Host: 62.25.213.216
X-Trace: newsg2.svr.pol.co.uk 1038534730 2578 62.25.213.216 (29 Nov 2002 01:52:10 GMT)
NNTP-Posting-Date: 29 Nov 2002 01:52:10 GMT
X-Complaints-To: abuse@theplanet.net
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300