[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] C++ ofstream problem



Hej Nils,

On Fri, 2003-05-09 at 20:37, Nils Åke Ljunggren wrote:
> Du har fået svar på dit spørgsmål -- men siden du i bruger -pedantic vil 
> jeg tillade mig samme:
> >  void printMessage (string msg) const;
> burde være
> void printMessage (const string& msg); // du undgår en copy-constructor og 
> indikerer const-ness i argumentet

Tak. Sådan ser det også ud i min "rigtige" kode - havde for
overskuelighedens skyld udeladt det fra mit minimale eksempel. :)

> Din destructor:
> ~Log() er superflous
> da std::basic_ofilestream<.> destructoren "flusher" og lukker 
> fil-descriptoren.

Aha, ser man det. Mange tak for tippet.

Mvh
./Brix
-- 
Henrik Brix Andersen <sslug@sslug>



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *