Counting word occurences This is a simple word count program I wrote to play around and get familiar with using std::map. Is there anything I can improve upon?

I didn't use CTRL+Z to stop the program because that suspends the process on Linux. 

#include &lt;iostream&gt;
#include &lt;iomanip&gt;
#include &lt;string&gt;
#include &lt;map&gt;
#include &lt;iterator&gt;
using std::cout;
using std::cin;
using std::endl;
using std::string;


int main(){
    std::map&lt;string, int&gt; words;
    cout &lt;&lt; "Enter some text. Type "***" to end." &lt;&lt; endl;

    std::istream_iterator&lt;string&gt; begin(cin);
    std::istream_iterator&lt;string&gt; end;

    while(begin != end){
        if(*begin == string("***"))
            break;
        words[*begin++]++;
    }
    for(std::map&lt;string,int&gt;::iterator iter = words.begin(); iter != words.end(); ++iter)
        cout &lt;&lt; std::setw(6) &lt;&lt; iter-&gt;second &lt;&lt; " " &lt;&lt; iter-&gt;first &lt;&lt; endl;

return 0;
}


Sample input:


engie does wut engie wants
pyro mad  
engie rek pyro
pyro go cry
deny engie u try
rekt u will get



Output:


 1 cry
 1 deny
 1 does
 4 engie
 1 get
 1 go
 1 mad
 3 pyro
 1 rek
 1 rekt
 1 try
 2 u
 1 wants
 1 will
 1 wut
You cannot use double quotes in a string literal like this:


cout &lt;&lt; "Enter some text. Type "***" to end." &lt;&lt; endl;



(The syntax-highlighting even changes the color of the ***.)

In order to print them out, you have to escape them as such:

cout &lt;&lt; "Enter some text. Type \"***\" to end." &lt;&lt; endl;


I suppose your compiler ignored the original, as I got an error when I tried it.

See this for more info on escape sequences in C++.