LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-29-2008, 03:02 PM   #1
dewjunkie
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
Using cout.precision()


I think I know the answer to this question, but I'd like to know for sure.

To be able to use

cout.setf(ios::fixed);
cout.setf(ios::showpoint);
cout.precision(x);

I have to use float instead of int right?

int is for intergers if I am not mistaken, but I'd like to know for sure.

Thx!
 
Old 01-30-2008, 11:26 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,977
Blog Entries: 11

Rep: Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879Reputation: 879
Looks like a C++ question to me - moved to programming.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C++: cout problem tntcoder Programming 3 08-02-2007 10:13 PM
cin/cout part of c or just c++ true_atlantis Programming 4 02-25-2006 06:54 PM
c++ cout not working :( Longinus Programming 10 08-01-2004 07:32 PM
C++ boolean in cout statement AMMullan Programming 2 06-08-2004 12:44 PM
cout queues miguetoo Programming 4 03-17-2004 02:02 AM


All times are GMT -5. The time now is 03:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration