⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list.h

📁 使用DIJKSTAR算法解决多点最短路径,还带文字解说
💻 H
字号:
/*  list.h - Robert Ollington - 1/8/05
    (based upon Mike Cameron-Jones' C implementation for KXA251)
    
    This is just the header file for the functions implemented in list.cpp

    It illustrates the use of #ifndef and #define that prevents the definitions
    being included twice when the file itself is included twice by mistake.
*/

#ifndef _LIST_H
#define _LIST_H

#include "connection.h"
/* Define node type */
class node
{
public:
    connection data_item;
    node* next;

	node();
	node(connection n);
};

class list
{
private:
	node* first;
   
public:
	/* Constuctor and Destructor */
	list();
	~list();

	/* Function to insert n at front of list */
	void insert_at_front(connection n);

	/* Function to print list */
	void print();

	/* Function to insert n in (non-decreasing) order in list - assuming list 
	items are already in (non-decreasing) order. */
	void insert_in_order(connection n);
	connection* getConnection(int index);
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -