📄 node.cpp
字号:
// Node.cpp: implementation of the Node class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Node.h"
#include "Object.h"
#include<iostream>
using namespace std;
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Node::Node()
{
info=NULL;
link=NULL;
}
Node::~Node()
{
cout<<"删除结点类"<<'\t';
delete info;
}
void Node::InsertAfter(Node *p)
{
p->link=link;
link=p;
}
Node * Node::RemoveAfter()
{
Node *tempP=link;
if(link==NULL)
tempP=NULL;
else link=tempP->link;
return tempP;
}
void Node::Linkinfo(Object *obj)
{
info=obj;
}
Node * Node::getlink(void)
{
return link;
}
void Node::setlink(Node *q)
{
link=q;
}
Object * Node::getinfo(void)
{
return info;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -