LinuxQuestions.org
Help answer threads with 0 replies.
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, 04: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, 12:26 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,005
Blog Entries: 11

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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 11:13 PM
cin/cout part of c or just c++ true_atlantis Programming 4 02-25-2006 07:54 PM
c++ cout not working :( Longinus Programming 10 08-01-2004 08:32 PM
C++ boolean in cout statement AMMullan Programming 2 06-08-2004 01:44 PM
cout queues miguetoo Programming 4 03-17-2004 03:02 AM


All times are GMT -5. The time now is 05:59 AM.

Main Menu
Advertisement
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