Skip to content

Instantly share code, notes, and snippets.

Created Apr 27, 2021
What would you like to do?
using namespace std;
int main() {
stringstream ss;
ss << "aa\nbb\n";
string str1;
getline(ss, str1);
cout << "str(): " << ss.str() << endl;
cout << "str().substr(tellg()): " << ss.str().substr(ss.tellg()) << endl;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment