[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: [PROGRAMMERING] C++ problem med ofstream



Carsten Svaneborg <sslug@sslug> wrote on 09-08-2005 
14:01:06:

> Hej!
> 
> Jeg har en problemer med at åbne en ofstream. Jeg har en klasse, der 
skal
> åbne en fil, klassen nedarves så og her skrives der til fra nogle 
virtuelle
> funktioner. Filnavnet er identisk i de to tilfælde.
> 
> 
> Følgende kode fejler med fail bitten sat:
> 
> class ClassSaveSample
> {
> public: 
>    ofstream fo;
> 
>    void Init(char* _base, char* _ext, bool _doTimeAvg)
>     {
> :

Jeg går udfra at ':' er en typo
og udfra dette (og navnet) gætter jeg på at klassen er konstrueret for 
eksemplets skyld

Hvis of tidligere har indgået i anden (out-of-sample) sammenhæng der har 
medført at good() == false så skal du bruge of.clear() før du igen kan 
bruge i/o-operationer på samme stream.


- Nils


Senior Developer 
sslug@sslug
Office Direct +45 4516 2352
Mobile +45 2613 9966 

IntraVision 
Lyngsø Alle 3, 2970 Hørsholm, Denmark
Office: +45 7023 2340
Fax: +45 7023 2349 
Web: www.intravision.dk


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-09-01, 02:01 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] *