Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ifstream compiler problem

Status
Not open for further replies.

vanleurth

Programmer
Sep 1, 2001
156
US
Hi everybody,

I have been trying to know why my visual c++ compiler pops up the following message,

error C2065: 'ifstream' : undeclared identifier

Here is what I think is the conflicting line in my code,

// Open header file for input
ifstream is( "payroll", ios::binary | ios::nocreate );

Even though I've included the fstream.h I think that I should define a library for the streams. Please I have read everything in the books and I know this should be a simple problem but no luck.

Thank you in advance,

Vanleurth
 
#include <iostream>
#include <fstream>

using namespace std;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top