📄 link.h
字号:
//// *********************************************************************// *// * Author : Gerald Carter// * Filename : link.h// * Date : 4/22/96// * Project : Compx Timing Tool// *// * Description // * ------------// *// * -------------------------// * Modifications// * -------------------------// *// **********************************************************************//// g++ template pragma#pragma interface// INCLUDE FILES#include <iostream.h> // I/O streams (cin, cout, cerr)#include "logic.h" // boolean typedef and associated macros#ifndef _LINK_H#define _LINK_H// ####################################################################// ## class nodeLink// ##// ## This class may be used as a base for linked nodes for various data // ## structures (ie. Binary Tree, Stack, Linked List, B-Tree, etc...)// ##template <int size>class nodeLink { private : nodeLink* point[size]; // array of pointers to links public : // CONSTRUCTORS nodeLink ( void ) { for ( int i = 0; i < size ; ++i ) point[i] = 0; } // GENERAL METHODS void SetLink ( int index, nodeLink* ptr ) { point[index] = ptr; } nodeLink* GetLink ( int index ) { return point[index]; }}; // end of class link#endif// This line allows us to instantiate the template for various// data structure ( ie. nodeLink<2>, etc... )#pragma implementation//********** end of link.h ***********************************************//*************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -