including <ios>
Posted: Thu May 18, 2006 7:24 pm
In one of the files that I've submitted, I wrote
I made sure to include
And this all worked perfectly fine on my machine at home, and it certainly seems to be in line with how I've seen 'fixed' described in all the reference books I can find. However, the compiler tells me:
04585573_24.c: In method `class string circle_equation::as_string_1()':
04585573_24.c:24: `fixed' undeclared (first use this function)
04585573_24.c:24: (Each undeclared identifier is reported only once
04585573_24.c:24: for each function it appears in.)
So I look up in my reference books what I should include to make sure that the compiler knows what 'fixed' is, and add the line
After adding this line to my program and compiling it on my machine here, everything still worked just fine. When I submitted it, however, I got yet another error message:
04585578_24.c:1: ios: No such file or directory
Well, I'm fresh out of ideas. Can anybody tell me how to get the compiler to compile my code?
Code: Select all
ostringstream o;
o << fixed << setprecision(3);
Code: Select all
#include <iomanip>
#include <sstream>
#include <string>
#include <cmath>
#include <vector>
#include <iostream>
using namespace std;
04585573_24.c: In method `class string circle_equation::as_string_1()':
04585573_24.c:24: `fixed' undeclared (first use this function)
04585573_24.c:24: (Each undeclared identifier is reported only once
04585573_24.c:24: for each function it appears in.)
So I look up in my reference books what I should include to make sure that the compiler knows what 'fixed' is, and add the line
Code: Select all
#include <ios>
04585578_24.c:1: ios: No such file or directory
Well, I'm fresh out of ideas. Can anybody tell me how to get the compiler to compile my code?