How I can read a paragraph from the keyboard and stored it in a linked list (each node has a one word)?
<pre><code>#include &lt;iostream&gt;
#include &lt;sstream&gt;
#include &lt;string&gt;
using namespace std;
class node
{
private:
    string data;
    node *next;
public:
    node*head,*current,*tail;
    node()
    {
     head=current=tail=NULL;
    }
    void read()
    {
     string x;
     tail=new node;
     cin&gt;&gt;tail-&gt;data;
     tail-&gt;next=NULL;
     head=current=tail;
     cin&gt;&gt;x;
     while(x!=".")
     {
      current=new node;
      current-&gt;next=NULL;
      stringstream ss;//("plez help me");
      string s;
      //getline(cin,aa);
      while (getline(ss, s,' ')) 
        {
            cout &lt;&lt; s &lt;&lt; "\t";

        }
      current-&gt;data=s;
      tail-&gt;next=current;
      tail=tail-&gt;next;
      //cin&gt;&gt;x;
     }
    }
    void print()
    {
     current=head;
     while(current!=NULL)
     {
      cout&lt;&lt;current-&gt;data&lt;&lt;endl;
      current=current-&gt;next;
     }
    }
};
</code></pre>
