ifstream and all other STL functions and classes are in namespace called std. To access them, you need to use std::<whatever you want here> (eg std::ifstream).
So then your constructor would look like this:
1 2 3
myClass::myClass (std::ifstream& file) {
// do stuff here
}
and your main would look like this:
1 2 3 4 5 6 7
int main () {
std::ifstream file;
// Note that this calls the constructor directly, rather than calling it and then calling the copy constructor
myClass classObj (file);
}