Infile problems with a class object

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Dec 2004
Posts: 2
Reputation: Israelside is an unknown quantity at this point 
Solved Threads: 0
Israelside Israelside is offline Offline
Newbie Poster

Infile problems with a class object

 
0
  #1
Dec 12th, 2004
just had a slight problem here with my input file...first off i declared a large class called Book....and then in the main function i have put ifstream inFile. I read from the file and such and it gives me the error

inFile' uses undefined class

I am not quite sure how to define the ifstream in the class or really how to approach this. thanks for the help
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 445
Reputation: 1o0oBhP is an unknown quantity at this point 
Solved Threads: 6
1o0oBhP's Avatar
1o0oBhP 1o0oBhP is offline Offline
Posting Pro in Training

Re: Infile problems with a class object

 
0
  #2
Dec 14th, 2004
have you got

  1. #include <fstream.h>

Somewhere?

If you have a problem there is a good file access tutorial on the c/c++ tutorials forum (fstream tutorial) which is very in depth and should solve any problems you have...
http://sales.carina-e.com

no www
no nonsense

coming soon to a pc near you! :cool:
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC