?? pattern.cpp
字號:
// Pattern.cpp: implementation of the CPattern class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "IsoData.h"
#include "Pattern.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CPattern::CPattern(int n)
{
N = n;
int i;
struct PatternElement * ptemp1,* ptemp2;
ptemp1 = new struct PatternElement;
pPatternElementHead = ptemp1;
ptemp2 = ptemp1;
for (i=1;i<=N;i++)
{
ptemp2->next = ptemp1;
ptemp2 = ptemp1;
if (i!=N)
ptemp1 = new struct PatternElement;
else
ptemp1 = NULL;
}
}
CPattern::~CPattern()
{
int i;
int j;
struct PatternElement * ptemp1;
ptemp1 = pPatternElementHead;
for (j=1;j<=N-1;j++)
{
for (i=1;i<=N-j;i++)
{
ptemp1 = ptemp1->next;
}
delete ptemp1;
}
delete pPatternElementHead;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -