需要注意原UVa題目有很明確的要求ASCII code的範圍需介在 32至127之間(*包含邊界)且不能考慮'\r'(13)和'\n'(10),
尤其因為windows 系統的換行符號是'\r\n',所以'\r'在使用getline(cin,str) 時會被讀取進來,這裡要小心。
原題敘述 :
Given a line of text you will have to find out the frequencies of the ASCII characters present in it. The
given lines will contain none of the first 32 or last 128 ASCII characters. Of course lines may end with
\n and \r but always keep those out of consideration.