Mail Archives: djgpp/1997/07/14/19:33:12
Mail*Link® SMTP cout << (double)
I'm using a version of gcc that was unzipped from files like gcc263bn.zip that I got on a Walnut Creek CD-ROM dated February 1996. I'm trying to develop C++ applications on a DOS platform.
When I do
cout << 4;
I get "4" on the screen.
When I do
cout << 4.5
I get "0.//////" on the screen.
When I do
cout << (float) 4.5;
I get "NaN" on the screen.
I've tried writing my own overload of
ostream &operator << (ostream&, double)
but can't get it to link this instead of the library version
I'm compiling using
gcc -c util.cpp
and linking using
gcc -g main.o util.o [other stuff].o -o <myprogram> -lgpp
Am I not using the right library?
Looks to me like the support or ostream doubles and other non integer, non string types is incomplete or I'm somehow using it incorrectly.
What is to be done?
Courtney DOT Duncan AT Jpl DOT Nasa DOT Gov
- Raw text -