Horje
how to split string into words c++ Code Example
split text c++
#include <boost/algorithm/string.hpp>

std::string text = "Let me split this into words";
std::vector<std::string> results;

boost::split(results, text, [](char c){return c == ' ';});
how to split string into words c++
#include <string.h>

int main ()
{
  char str[] ="This is a sample string";
  char *p;
  
  p=strtok(str," ");
  while (p!= NULL)
  {
    cout<<p;
    p=strtok(NULL," ");
  }
  return 0;
}




Cpp

Related
Processing a string- CodeChef Solution in CPP Code Example Processing a string- CodeChef Solution in CPP Code Example
C++ Volume of a Sphere Code Example C++ Volume of a Sphere Code Example
how to print a word in c++ Code Example how to print a word in c++ Code Example
google snake game Code Example google snake game Code Example
three-way comparison c++ Code Example three-way comparison c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9