Skip to content

Instantly share code, notes, and snippets.

View szdr's full-sized avatar

szdr szdr

  • YJ
  • Tokyo
View GitHub Profile
@conrjac
conrjac / Split string
Created April 15, 2013 11:12
C++ Split String and store in vector
int main()
{
std::string input = "abc,def,ghi";
std::istringstream ss(input);
std::string token;
vector<string> playerInfoVector;
while(std::getline(ss, token, ',')) {
playerInfoVector.push_back(token);
std::cout << token << '\n';