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

📄 graph.h

📁 Template functions for serializing arbitrary linked nodes. 串行化连接节点的模板函数(源码)(25KB)
💻 H
字号:
#ifndef GRAPH_H
#define GRAPH_H

#pragma warning(disable:4786)
#include <vector>
using namespace std;

struct Graph{
    Graph(int x=0,int y=0):x(x),y(y){}

    int x,y;
    vector<Graph*> vecConnections;
};

class vectorGraph: public vector<Graph*>
{
public:
    void clear()
    {
        for(unsigned i=0;i<size();i++){
            delete operator[](i);
        }
        vector<Graph*>::clear();
    }
};

#endif

⌨️ 快捷键说明

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