同學寫的數設

2021-04-09 04:37:25 字數 780 閱讀 7461

/* 標準文件模板 */

#include

#include

#include

#define n 20

//#define error  0

typedef struct node

lnode,*linklist;

void createlist_l(linklist *l,int n)

q = (*l);/* 先建立帶結點的單鏈表 */

q->data = 1;

i = 2;

while(n > 1)

p->data = i;

q->next = p;

q = p;

// start++;

i++;

n--;

}q->next=(*l);

}int listdelete_l(int m,linklist *l)

/* 尋找第m個結點,並令p指向其前驅 */

if(m == 1)

else

(*l)=p->next;

free(q);

return e;

}/* listdelete_l */

int main(void)

printf("/n");

system("pause");

return 0;

}同學寫了, 我幫忙修改了一下本來可以把密碼放在結點中,為什麼還有一陣列來儲存密碼了(我覺得複雜了),還有在輸入的時候沒有對無效字元進行處理,總之要改的太多了。還需慢慢成長啊。 

邱同學寫的huffman編碼程式

學過了哈夫曼編碼知識點,邱同學就給我發來了相關程式,看起來還不錯。貼出來 以饗大家。要點 1 二叉樹用偽指標表示法 2 哈夫曼編碼採用自下而上回溯的辦法。include include includeusing namespace std define ok 1 define error 0 def...

寫畢設遇到的sql問題

用的是idea內建的h2資料庫。問題1 判斷是否為空應該用is null,而不是 null。select count from data where disturb time is null or error code num is null or ciphertext notice time is...

寫畢設查詢的問題總結

換行問題 強制不換行p 超出顯示省略號p suwu150 比較日期 改變滑鼠樣式 cursor pointer 手 cursor wait 等待 cursor help 幫助 vue 路由跳轉 this.router.push login this.router.push this.router.p...