Created
August 3, 2023 03:57
-
-
Save lakpahana/518767ae0496a6ca316ff9d9775c8c72 to your computer and use it in GitHub Desktop.
How To Read A STRING Line In C++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <string> | |
#include <sstream> | |
string line; | |
getline(cin, line); | |
istringstream iss(line); | |
string word; | |
while (iss >> word) | |
{ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment