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
Solved

Header File

Posted on 1998-09-09
3
176 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
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 10 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Handle Exceptions during instantiation 28 422
Add values of each row in an array 3 63
Beginner to Unreal Engine 4 5 94
max float value 3 51
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

809 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