473,386 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

ios_base (where is this file)

I'm learning C++ and am using a simple IDE to enter code.
My code is as follows.

#include <iostream>
#include <fstream>
#include <cstdlib>
void file_it(ostream &os, double fo, const double fe[],int n);

using namespace std;
int main()
{ //...simple code...// }

void file_it(ostream & os, double fo, const double fe[], int n)
{
ios_base::fmtflags initial; // <<<< compile error here
initial = os.setf(ios_base::fixed); // save initial formatting state
....
}
Using my preferred ide (C-free) I get a compile error "ios_base"
undeclared. When copying the exact code into Borland C++ BuilderX and
another simple ide 'Quincy' they compile perfectly. Any advice would
be appreciated (I know I can use my other compilers, but I would like to
know what is not happening).

Steven Taylor
Melbourne Australia.
Jul 23 '05 #1
1 1995

"Steven Taylor" <ne******@superjacent.net> wrote in message
I'm learning C++ and am using a simple IDE to enter code.
My code is as follows.

#include <iostream>
#include <fstream>
#include <cstdlib>
void file_it(ostream &os, double fo, const double fe[],int n);

using namespace std;
int main()
{ //...simple code...// }

void file_it(ostream & os, double fo, const double fe[], int n)
{
ios_base::fmtflags initial; // <<<< compile error here
initial = os.setf(ios_base::fixed); // save initial formatting state
....
}
Using my preferred ide (C-free) I get a compile error "ios_base"
undeclared. When copying the exact code into Borland C++ BuilderX and
another simple ide 'Quincy' they compile perfectly. Any advice would
be appreciated (I know I can use my other compilers, but I would like to
know what is not happening).


<ios> is the file you are looking for. It describes the base class of the
hierarchy and is usually automatically included by other header files of the
library that contain the derived classes.

Sharad

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: 77123036 | last post by:
#include <iostream> #include <fstream> using namespace std; int main() { fstream inOut( "copy.out", ios_base::in|ios_base::app ); int cnt=0; char ch; inOut.seekg(0);
2
by: Generic Usenet Account | last post by:
What exactly is the difference between the hex manipulator and the following statement: cout.setf(ios_base::hex)? According to Stroustrup, Third Edition, Section 21.4.4, "once set, a base is...
1
by: clusardi2k | last post by:
Hello, What can I do about these gcc Red Hat Linux errors. They are coming from the archive file. %gcc -I/usr/fltk -O2 -Wall -Wunused -fno-exceptions -I/usr/X11R6/include -o run main.o...
3
by: Boris | last post by:
After including sstream the compiler reports hundreds of errors. They are all caused by a missing ios_base definition. When I search for ios_base in the installation directory of VS.NET 2003 I find...
6
by: Geoffrey S. Knauth | last post by:
It's been a while since I programmed in C++, and the language sure has changed. Usually I can figure out why something no longer compiles, but this time I'm stumped. A friend has a problem he...
7
by: DaVinci | last post by:
//error happen even when there existe a a.txt file #include<fstream> #include <string> #include <iostream> using std::string; using std::fstream; int main() { string s = "a.txt"; fstream...
9
by: Robin | last post by:
// Pls note that test.txt exists. #include <iostream> #include <fstream> #include <string> using namespace std; int main() { fstream fs("test.txt", ios_base::in | ios_base::app);
2
by: Chris Forone | last post by:
hello group, are there differences (run-time, ...) between the following two versions? .... catch (std::ios_base::failure exception) .... .... catch (const std::ios_base::failure&...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.