请高手指点一下这段代码错在什么地方
//统计并输出所读入的单词出现的次数#include<iostream>
#include<string>
#include<map>
using namespace std;
int main()
{
map<stirng, int> wordCount;
string word;
cout << "Enter word for map(ctrl+z end): " << endl;
while (cin >> word)
++wordCount[word];
cout << "word\t\t" << "times" << endl;
for(map<string, int>::iterator iter = wordCount.begin();
iter != wordCount.end(); ++iter)
cout << (*iter).first << "\t\t"
<< (*iter).second << endl;
return 0;
}
在code::blocks下编译时出现以下错误:
G:\源程序\cpp.prime\第十章\习题\10-9.cpp: In function 'int main()':
G:\源程序\cpp.prime\第十章\习题\10-9.cpp:9: error: 'stirng' was not declared in this scope
G:\源程序\cpp.prime\第十章\习题\10-9.cpp:9: error: template argument 1 is invalid
G:\源程序\cpp.prime\第十章\习题\10-9.cpp:9: error: template argument 3 is invalid
G:\源程序\cpp.prime\第十章\习题\10-9.cpp:9: error: template argument 4 is invalid
G:\源程序\cpp.prime\第十章\习题\10-9.cpp:9: error: invalid type in declaration before ';' token
G:\源程序\cpp.prime\第十章\习题\10-9.cpp:15: error: no match for 'operator[]' in 'wordCount[word]'
G:\源程序\cpp.prime\第十章\习题\10-9.cpp:25: error: request for member 'begin' in 'wordCount', which is of non-class type 'int'
G:\源程序\cpp.prime\第十章\习题\10-9.cpp:26: error: request for member 'end' in 'wordCount', which is of non-class type 'int'