Message-ID: <3BC14C40.3E3544CF@falconsoft.be> Date: Mon, 08 Oct 2001 08:48:32 +0200 From: Tim Van Holder Organization: Anubex (www.anubex.com) X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.2.16-3 i686) X-Accept-Language: en, nl-BE, nl MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: iostream function "form" in DJGPP V3 References: <9ppeci$gjv$02$1 AT news DOT t-online DOT com> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Lines: 34 NNTP-Posting-Host: 194.78.64.238 X-Trace: 1002523771 reader0.news.skynet.be 21080 194.78.64.238 X-Complaints-To: abuse AT skynet DOT be To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Günter R" wrote: > > in V2 of DJGPP this worked as expected: > > #include > cout.form ("%8.3f\n", a); .... > > in V3 it does not work anymore. > The error message is: > Error: "form" undeclared .... > > I'm working with DJGPP V3.0 and RHIDE 1.4.9 > > Thanx Note: it's GCC v3.0, NOT DJGPP v3.0. DJGPP is the entire environment, NOT the compiler. As for form(), it was a GNU extension that has now been removed for ANSI compliance. You'll have to rewrite your output using C++ syntax: // Note: no .h! - iostream.h is not ANSI and will likely // be removed in future versions of gcc #include #include ... cout << setwidth(8) << setprecision(3) << a << endl; or use a buffer and sprintf: char outbuf[16] = { "" ); sprintf (outbuf, "%8.3f", a); cout << outbuf << endl;