String Stream use for Split Word From String

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string a, w;
    int c = 0;
    cout << "Enter A String :: ";
    getline(cin, a);

    stringstream st(a);

    cout << endl << "Word Are :: " << endl;
    while(st >> w)
    {
        cout << w << endl;
        c++;
    }
    cout << "Total Word Are :: " << c << endl;
    return 0;
}

Comments