Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Header File

Posted on 1998-09-09
3
Medium Priority
?
181 Views
Last Modified: 2010-04-02
I am using #include<fstream.h>  in my C++ program. compile error says that fstream.h not found, because it is not in /usr/include.

means,I have C compiler on my machine but not that header file.
why??????how to get?????
from where I can get that file
0
Comment
Question by:anilkumarv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 6

Expert Comment

by:WxW
ID: 1172426
Linux ( or other UNIX implementations , as I might understood from your /usr/include ) probably do not have the fstream.h I don't know why , but I have this file ... if you want me to mail it .... mail to xmic@freemail.gr

P.S. Since you work on UNIX platforms , there is no guarantee that my file should work on your system .

0
 
LVL 11

Accepted Solution

by:
alexo earned 30 total points
ID: 1172427
The /usr/include probably means you have a unix machine.

First, you have to make sure you have a C++ compiler on your machine.  A C compiler will not compile a C++ program no matter how nicely you ask.

Second, the newer C++ compilers follow the standard's practice of ommiting the .h suffix on the standard include files.  Try #include <fstream> instead.

Third, the include files may reside on a different directory.  Search your disk for fstream or fstream.h and tell the compiler to use the directory one of those files resides in as its include directory.  It can be done using a command-line switch (usually -i or -I) or an environment variable, depends on your compiler.
0
 

Author Comment

by:anilkumarv
ID: 1172428
Thanks, alexo
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question