Hello, please help, the problem is in the getline() function, which takes 2 arguments: The input stream, from which the string should be extracted and the line into which the characters from the input stream are read . There is an additional 3rd argument, but I do not use it.
My problem is that I implement my own class String and getline() course, swears at the second argument, since it is not the one it needs, but my custom one.
Could you tell me how to properly implement the getline() method with my argument?
I hope that my class is String, I implement it correctly, therefore, I do not show its code due to its size and uselessness. The problem is in the method.
The code where I use getline() :
string str; // typedef мой класс Sring для удобства int readCount = 0; int n = atoi(num); readRecord.open(fileName); if (_access(fileName, 0) != 0) { std::cout << "Error:FILE NOT FOUND" << std::endl; exit(1); } else { while (std::getline(readRecord, str))// здесь именно моя проблема { readCount++; lines.push_back(str); }
std::basic_stringor do not use the standard getline - vp_arthgetline(), you can prompt its implementation with my argument, I can’t dig up the right Internet - Nikita Gusev