I am aware that I can initialize an object of type ifstream like :
std::ifstream ifs ("test.txt", std::ifstream::in);
But let's say I have a class which needs to have ifstream object as a member of the class:
class A
{
private:
std::ifstream file;
}
How should I go about initializing this object in the classes' constructor?