當前位置:編程學習大全網 - 編程軟體 - Cbf編程

Cbf編程

結構數據//結構

{

long int DNum

struct DataL * next

};

//插入函數,參數是左右節點的指針。返回當前節點指針。

struct DataL * InsertD(struct DataL * LeftD,struct DataL *RightD,long int D)

{

struct DataL * TempD

TempD=CreatD(RightD,D);

如果(LeftD!=0) LeftD->next = TempD

if(TempD = = 0)exit ex e(LeftD);

返回TempD

}

//創建新的節點函數

結構數據*創建(結構數據*頭,長整型)

{

struct DataL * temp

temp =(struct DataL *)malloc(sizeof(struct DataL));

temp->;DNum = D;

temp->;下壹個=頭;

返回溫度;

}

void Exit exe(struct datal * head)//退出函數。

{

struct DataL *temp1=Head,* temp2

while (temp1!=0)

{

temp 2 = temp 1;

temp 1 = temp 1->;接下來;

自由(temp 2);

}

總的來說是這樣的。我這裏有個相關的例子,沒編好,可以看看。

  • 上一篇:請幫忙寫壹個Excel VBA查找的代碼,不勝感激!!
  • 下一篇:編程要求:用八個LED發光二極管實現流水燈,系統啟動後,流水燈左向流轉,按下K1鍵,則反向流轉,再按則再
  • copyright 2024編程學習大全網