954,504 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Infile problems with a class object

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

Israelside
Newbie Poster
2 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

have you got

#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... :)

1o0oBhP
Posting Pro in Training
445 posts since Dec 2004
Reputation Points: 16
Solved Threads: 6
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You