📄 link.cpp
字号:
// Link.cpp: implementation of the Link class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ConvexHull.h"
#include "Link.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
Link::Link()
{
m_First=0;
}
Link::~Link()
{
}
MyPoint* Link::Back(){
MyPoint* cur=m_First;
while(cur->right){
cur=cur->right;
}
return cur;
}
int Link::Length() const{
MyPoint *cur=m_First;
int len=0;
while(cur){
len++;
cur=cur->right;
}
return len;
}
void Link::Append(MyPoint& x){
if(m_First){
MyPoint* last=Back();
last->right=&x;
x.left=last;
}
else{
m_First=&x;
m_First->left=0;
}
x.right=NULL;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -