delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/08/26/14:34:20

From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Resetting IOS Flags
Date: 26 Aug 2003 18:03:50 GMT
Organization: Aachen University of Technology (RWTH)
Lines: 17
Message-ID: <big7e6$fg$1@nets3.rz.RWTH-Aachen.DE>
References: <20030826134859 DOT 28568 DOT 00000444 AT mb-m18 DOT aol DOT com>
NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de
X-Trace: nets3.rz.RWTH-Aachen.DE 1061921030 496 137.226.32.75 (26 Aug 2003 18:03:50 GMT)
X-Complaints-To: abuse AT rwth-aachen DOT de
NNTP-Posting-Date: 26 Aug 2003 18:03:50 GMT
Originator: broeker@
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

MMarkHinchcliffe <mmarkhinchcliffe AT aol DOT com> wrote:
> I'd be very grateful if anyone could tell me what's wrong with the
> following code.

> The line "os.setf( oldflags, ios::basefield);"
> gives 2 compilation errors:
> "invalid conversion from 'long int' to 'std::_Ios_Fmtflags'"

>   long oldflags = os.setf( ios::hex, ios::basefield);

The compiler quite obviously dislikes 'oldflags' being of type long.

You'll need to choose some other type --- consult STL documentation to
see which that should be.
-- 
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019