wctest16.cpp
来自「开放源码的编译器open watcom 1.6.0版的源代码」· C++ 代码 · 共 43 行
CPP
43 行
#include <wclist.h>
#include <iostream.h>
#include <string.hpp>
int main() {
WCPtrSList<String> list2;
String d1("str#1");
String d2("str#2");
String d3("str#3");
WCPtrSList<String> * list = new WCPtrSList<String>();
list->insert( &d1 );
list->insert( &d2 );
list->insert( &d3 );
list2 = *list;
String * data;
while( !list->isEmpty() ) {
data = list->get();
cout << *data << "\n";
};
cout << "\n";
cout.flush();
delete list;
WCPtrSList<String> list3 = list2;
while( !list2.isEmpty() ) {
data = list2.get();
cout << *data << "\n";
};
cout << "\n";
cout.flush();
while( !list3.isEmpty() ) {
data = list3.get();
cout << *data << "\n";
};
cout.flush();
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?