main.cpp
来自「数据结构与程序设计教材源码 数据结构与程序设计教材源码」· C++ 代码 · 共 24 行
CPP
24 行
#include "../../C/UTILITY.H"
#include "../../C/UTILITY.CPP"
typedef char Node_entry;
#include "NODE.H"
#include "NODE.CPP"
main()
{
Node first_node('a'); // Node first_node stores data 'a'.
Node *p0 = &first_node; // p0 points to first_Node.
Node *p1 = new Node('b'); // A second node storing 'b' is created.
p0->next = p1; // The second Node is linked after first_node.
Node *p2 = new Node('c', p0); // A third Node storing 'c' is created.
// The third Node links back to the first node, *p0.
p1->next = p2; // The third Node is linked after the second Node.
cout << p0 << " " << p1 << " " << p2 << " " << "\n";
cout << p0->entry << " " << p1->entry << " " << p2->entry << " " << "\n";
cout << p0->next << " " << p1->next << " " << p2->next << " " << "\n";
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?