📄 example.cc
字号:
// file: $isip/doc/examples/class/dstr/dstr_example_00/example.cc// version: $Id: example.cc,v 1.4 2000/12/17 17:53:50 hamaker Exp $//// isip include files//#include <String.h>#include <DoubleLinkedList.h>// main program starts here:// this example produces a linked list of randomly generated nonsense strings// note that the linked list has two modes - USER and SYSTEM.// we use the default mode (SYSTEM) here so that we do not have to deal// with memory allocation and deallocation//int main() { // declare a DoubleLinkedList in SYSTEM mode // DoubleLinkedList<String> list_string; // add 10 randomly generated strings, all with lengths on the range [5,20], // to the linked list // for (long i = 0; i < 10; i++) { // generate the random string // String tmp_str; tmp_str.rand(5,20); // add the random string to the list. this inserts at the current location // and changes the current location to be this item. // list_string.insert(&tmp_str); } // display the contents of the list // list_string.debug(L"list of random strings"); // exit gracefully // Integral::exit();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -