My mistake, in my previous post I believed you ask a general C++ question.
From what I can see in the
SDL_RWops Wiki there exists no dedicated read-line function for text files.
You could read the text file entirely into memory as shown in the
SDL_RWread example into a
char buffer (such as
std::vector<char>) then load the buffer into a
std::strstream on which you use
std::getline() as in shown in my previous reply.
Another idea, which doesn’t load the entire file into memory, is to read
char into a
push_back) by using
SDL_ReadU8() until you detect
(BTW I am “andrei” after recovering my original account.)
EDIT: I hope you don’t have to use Unicode text files, or the above ideas won’t work.