listsegment.cpp
来自「路由信息查看程序」· C++ 代码 · 共 60 行
CPP
60 行
// ListSegment.cpp: implementation of the CListSegment class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "SnmpManager.h"
#include "ListSegment.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CListSegment::CListSegment()
{
}
CListSegment::~CListSegment()
{
}
LineList* CListSegment::create ()
{
LineList *temp;
head = (LineList*)malloc(sizeof(LineList));
// temp->InDigit = 0;
// temp->next = NULL;
return temp;
}
void CListSegment::ReceiveDigit (int Digit)
{
LineList *p1, *p2, *p;
if(head->next == NULL)
{
p1 = (LineList*)malloc(sizeof(LineList));
p1->InDigit = Digit;
p1->next = NULL;
head->next = p1;
}
else
{
p = head;
p2 = (LineList*)malloc(sizeof(LineList));
p2->InDigit = Digit;
p2->next = NULL;
while(p->next != NULL)
{
p = p->next ;
}
p->next = p2;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?