cvs.gedasymbols.org/archives/browse.cgi | search |
From: | Iztok Polanic <ssdipola AT alpha DOT computers DOT org> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | c++ problem |
Date: | 29 Aug 1998 21:12:35 GMT |
Organization: | IBM.net |
Lines: | 51 |
Message-ID: | <6s9qs3$su6$4@planja.arnes.si> |
Reply-To: | Iztok DOT Polanic1 AT guest DOT arnes DOT si |
NNTP-Posting-Host: | ms4-196i.dial-up.arnes.si |
User-Agent: | tin/pre-1.4-980105 (UNIX) (Linux/2.0.34 (i586)) |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Hello !!! I've bought myself a book called Beginning C++ ANSI/ISO Compliant by Ivor Horton. But the example doesn't want to compile. I always receive this error: -------------- 2.6A.cpp:3: warning: namespaces are mostly broken in this version of g++ 2.6A.cpp: In function nt main()': 2.6A.cpp:12: Fixed' undeclared (first use this function) 2.6A.cpp:12: (Each undeclared identifier is reported only once 2.6A.cpp:12: for each function it appears in.) 2.6A.cpp:15: Scientific' undeclared (first use this function) -------------- Here's the source code: -------------- #include <iostream.h> #include <iomanip.h> using namespace std; int main() { float value1 = 0.1f; float value2 = 2.1f; value1 -= 0.09f; value2 -= 2.09f; cout << setprecision(14) << fixed; cout << value1 - value2 << endl; cout << setprecision(5) << scientific; cout << value1 - value2 << endl; return 0; } ----------------- TNX!!!! Please respond to my email!!! Bye. -- ////// xxxxxx ( o o ) xx xx /------------oOO-----O-----OOo------------\ xx xx | From: Iztok Polanic | xxxx | E-mail: Iztok DOT Polanic1 AT guest DOT arnes DOT si | xx xx | WWW: http://kotzi.home.ml.org | xx xx | http://www.intering.si | xx xx | ICQ: Kotzi => *12556824* | \-----------------------------------------/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |