fixed

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

fixed

Post by Charles256 »

what could possibly be wrong with ...

Code: Select all

cout << setprecision(2) << fixed;
yes i did include iomanip....
this is the error I gget...
:\Documents and Settings\Owner\Desktop\Program3\Program3\Program3.cpp(29) : error C2065: 'fixed' : undeclared identifier
Last edited by Charles256 on Tue Sep 20, 2005 9:01 pm, edited 1 time in total.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

fixed is defined in ios

Code: Select all

#include <ios>
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

is my c++ book that old? :o
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

actually that didn't fix it..hmm..
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post by Charles256 »

i fixed it.had to change my includes, remove the .h's and declare using namespace std; and that fixed it.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

yeah.. this works for me....

Code: Select all

#include <iostream>
#include <iomanip>

using namespace std;

void main() {
	cout << setprecision(2) << fixed;
}
Post Reply