Created
March 6, 2022 00:28
-
-
Save s1s1ty/4bd30a295418a68b44350642d3fb6ded to your computer and use it in GitHub Desktop.
st
This file contains 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 <sstream> | |
stringstream ss; | |
string s; //main string | |
string newString; //new string | |
ss << s; //assign s to ss | |
while(ss >> newString) { // Spilit string | |
cout<< newString <<endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment