streedrawa.cpp
来自「Data structures with C++ second edition 」· C++ 代码 · 共 28 行
CPP
28 行
#include <string>
#include "d_stree.h" // stree class
using namespace std;
int main()
{
string str = "globe";
string list[] = {"Dolan", "Wren", "Gates", "Smith", "Brand"};
// declare a character tree
stree<char> charTree;
int i;
for (i=0; i < str.length(); i++)
{
charTree.insert(str[i]);
// display tree after each insert
charTree.drawTrees(1);
}
stree<string> strTree(list, list+5);
strTree.drawTree(5);
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?