Answer the question
In order to leave comments, you need to log in
Working with a file through a c++ function?
Good afternoon!
Tell me how to write a function for reading a line from the number N to the number M, so that it can later be used to read from M + 1 to K. I implemented the solution, but it requires you to go to the beginning of the file, then through the GoToLine (M + 1) function ) go to M+1 line, and then from M+1 to K.
I want to be able to use this function like this - GetMN(FILE,N,M);GetMN(FILE,M+1,K);
Implemented now - GetMN(FILE,N,M); FILE.CLEAR(); FILE SEEKG(0); GoToLine(M+1); GetMN(FILE,M+1,K);
void GetMN(std::fstream& file,int n,int k){
..
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question