?? link.cpp
字號(hào):
// 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;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -