新手求助,此程序为什么不能正常运行?
MTSXC 2012-04-12 12:30:36 这段程序为什么会提示:0x0042eea9指令引用的0x524f5347内存不能为read ??没有下标越界啊
#include <iostream>
#include <string>
using namespace std;
int main()
{
string *pstr=new string[10];
for(size_t index=0;index<9;++index)
{
*(pstr++)=index;
cout<<*(pstr++)<<endl;
}
delete [] pstr;
system("pause");
return 0;
}