i want to get token from string using string class. i know that using cstring, i can use strtok.can i use it?
#include <iostream>
#include <string>
using namespace std;
void echo(string message)
{
cout << message << endl;
}
int main()
{
cout << "Enter your word: ";
string word; // place declaration near its use
cin>>word
echo(word);
}