123456789101112
int main() { ifstream objfile("log.txt"); // for loop: process(); } void process() { // some processing // objfile.seekg(...) //couldn't use objfile
12345678
ifstream objfile int main() { objfile(somefileName); // gives error }
123
void process(ifstream& some_stream) { ...