string *p=new string[20]; scoped_array<string> sp(p); fill_n(&sp[0],20,"zhaoxi"); { sp[0]="100"; cout<<sp[0].size()<<endl; }
boost-内存管理(scoped_array)
原文:http://www.cnblogs.com/oracleloyal/p/5061842.html