?? lottorydata.cpp
字號:
// LottoryData.cpp: implementation of the LottoryData class.
//
//////////////////////////////////////////////////////////////////////
#include "WinLottory.h"
#include "LottoryData.h"
#include "WinLottoryDoc.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
LottoryData::LottoryData()
{
m_nNodeId=0;
}
LottoryData::~LottoryData()
{
}
// 鏈表頭
// LottoryDataNode* m_pNodeChainHead;
// 前驅節點
// LottoryDataNode* m_pNodeChainVan;
// 當前節點
// LottoryDataNode* m_pNodeChainCur;
// 臨時節點
// LottoryDataNode* m_pNodeChainTemp;
// 鏈表長度
// int m_nChainLength;
LottoryDataNode* LottoryData::addNode(CString *string)
{
if (m_pNodeChainHead==NULL)
{
LottoryDataNode* addNode = (LottoryDataNode*)malloc(sizeof(LottoryDataNode));
addNode->content=*string;
m_nNodeId++;
addNode->num=m_nNodeId;
m_nChainLength=1;
m_pNodeChainHead=addNode;
m_pNodeChainCur=addNode;
m_pNodeChainVan=addNode;
addNode=NULL;
}
else
{
LottoryDataNode* addNode = (LottoryDataNode*)malloc(sizeof(LottoryDataNode));
addNode->content=*string;
m_nNodeId++;
addNode->num=m_nNodeId;
m_nChainLength++;
// pDoc->m_pNodeChainTemp->next = addNode;
// pDoc->m_pNodeChainTemp = addNode;
addNode=NULL;
}
return NULL;//pDoc->m_pNodeChain;
}
LottoryDataNode* LottoryData::delNode(int num)
{
/* LottoryDataNode* head = pDoc->m_pNodeChain;
LottoryDataNode* temp = NULL;
while(true)
{
if (head->num==num)
{
if (head->next==NULL)
{
}
}
head->next=head;
}
return pDoc->m_pNodeChain;
*/
return NULL;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -