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?