wctest15.cpp
来自「开放源码的编译器open watcom 1.6.0版的源代码」· C++ 代码 · 共 42 行
CPP
42 行
#include <wclist.h>
#include <iostream.h>
int main() {
WCPtrSList<int> list2;
int d1(7);
int d2(2);
int d3(9);
WCPtrSList<int> * list = new WCPtrSList<int>();
list->insert( &d1 );
list->insert( &d2 );
list->insert( &d3 );
list2 = *list;
int * data;
while( !list->isEmpty() ) {
data = list->get();
cout << *data << "\n";
};
cout << "\n";
cout.flush();
delete list;
WCPtrSList<int> 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 + -
显示快捷键?