cplusplus.com cplusplus.com
cplusplus.com   C++ : Forums : Beginners : How To?
  Search:
- -
C++
Information
Documentation
Reference
Articles
Sourcecode
Forums
Forums
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Articles
Lounge
Jobs

-

post  How To?

walaskey (7)
Hey if you keep getting alphanumeric data as outputs instead of numerical data then what could the issue be?

here is an example of:

$1.2e+003 instead of $1,167.15?
|
HeatMan (65)
Post the code and we'll see what is the problem.
|
jsmith (711)
By default floating point numbers are output in scientific notation, which is what you are seeing. You need to set the precision and # of decimal places.

If using iostreams, look up setprecision().

|

This topic is archived - New replies not allowed.
Home page | Privacy policy
© cplusplus.com, 2000-2008 - All rights reserved - v2.2
Spotted an error? contact us