}
// show
cout << \ After erase, the elements of iVec are:\ << endl; for ( vector
cout << \ After erase, the elements of iLst are:\ << endl; for ( list
27.编写程序处理一个string类型的list容器。在该容器中寻找一个特殊值,如果找到,则将它删除掉。用deque容器重写上述程序。
// 11.15_9.27_StringList_Find_Earse.cpp : 定义控制台应用程序的入口点。 //
#include \#include #include
int _tmain(int argc, _TCHAR* argv[]) { string strSerVal(\); string strArr[] = { \, \, \ }; list
}
cout << \ << endl; strLst.erase( Lit ); }
system(\); return 0;
用deque重写以上程序: string strSerVal(\); string strArr[] = { \, \, \ }; deque
28.编写一个程序将一个list容器的所有元素赋值给一个vector容器,其中list容器中存储的是指向C风格字符串的char*指针,而vector容器的元素则是string类型。 // 11.15_9.28_assignListToVector.cpp : 定义控制台应用程序的入口点。 //
#include \#include #include