473,387 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

problem with iomanip

i'm having a problem with iomanip.
i use
cout<< fixed<< setprecision(5);
and it just does not recognize "fixed"

i use
cout<< setprecision(5)<< showpoint<< x<< endl;
this time not recognizing "showpoint"

and of course
cout<< setprecision(5)<< x<< endl;
has no effect.

can you help me with iomanip or tell me about other ways to have 5digits after decimal poin?

tnx
Khosrow
Nov 1 '07 #1
2 1457
scruggsy
147 100+
fixed, showpoint, et al are in the std namespace.
Did you call using namespace std; or using std::fixed?
Alternatively, does cout << std::fixed; compile?
Nov 1 '07 #2
weaknessforcats
9,208 Expert Mod 8TB
Did you include <iomanip>?
Nov 1 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Christopher | last post by:
Can someone give me an example of how to use the hex manipulator defined in <iomanip>. I am reading the doc but it doesnt give me the syntax, or at least I don't understand it. Thanx, Christopher
4
by: Henry Jordon | last post by:
I have everything pretty much done but I need to fix something in my coding. I want to be able to enter strings such as "love", "hate", "the", etc. but am unable to figure how to do this. I have...
3
by: Vaxius | last post by:
After trying to compile the following code, gcc gives me error: 'setwidth' was not declared in this scope I'm not sure why it would do this, since iomanip is included. Am I missing something?...
4
by: alternativa | last post by:
Hi, I'd like to obtain an output looking as follows: name number phone address Caroline 233 34234 White St. 12 Anna 929043 093284 Brown St. 325...
2
by: rupert | last post by:
i've got the following code: #include <iostream> #include <string> #include <vector> #include <iomanip> using namespace std; int main(double argc, char* argv) { double r = 0.01;
7
by: ucfcpegirl06 | last post by:
Hello, Maybe someone can help me with this. I believe I have a memory allocation problem. The program crashes w/ a debug error. cpp file: #include <cstdio> #include <cstring> #include...
9
by: mcdougal.robert | last post by:
Alright here is the issue. To begin with I am new to c++ and I am a little lost of this homework assingment. The assignment was to allow the user to enter in information about a small company and...
3
by: PengYu.UT | last post by:
Hi, I setprecision to be 100 for both cases. I'm wondering why the number of digits are different. Also, for a double number, I think any digits that are longer than 15 (or 16) are not...
6
by: Bernd Gaertner | last post by:
Dear experts, according to the standard, manipulators like noskipws are declared in the header ios (). But when I look at code that is around, I usually see #include<iomanipbeing used. What is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.