Created
April 3, 2020 20:52
-
-
Save bakkiraju/4e71a62d6545f9640d596889d457d5ad to your computer and use it in GitHub Desktop.
C++ Cheat sheet
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
String tokenizing in c++ | |
======================= | |
#include <sstream> | |
string s = "data structures and algorithms practice"; | |
istringstream iss; | |
iss.str(s); | |
string token; | |
while (getline(iss, token, ' ')) | |
{ | |
oss << token << " "; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment