随笔分类 - c codes
c 数据结构
摘要:in c ,there is no true or false,but we can define them
阅读全文
摘要:use define to define a function to change the value of a var
阅读全文
摘要:#if #ifdef和#ifndef
阅读全文
摘要:一个数组元素的有趣的尝试 最前面的让它最小,最后面的让它最大。
阅读全文
摘要:来自经典100例1#include<stdio.h>2#include<stdlib.h>34structlink5{6intdata;7structlink*next;8};910//nodeisatype,linkisanodepointtype11typedefstructlinknode;12typedefnode*link;1314//Listdeletefreememory15voidList_delete(linkhead,linktail)16{17linkfor_del;18for_del=head;1920while(for_del!=tail)21
阅读全文
摘要:重新开始写代码。先从数据结构开始:两上链表的链接(来自经典100例的改进)1#include<stdlib.h>2#include<stdio.h>34//#defineNUM556structlist7{8intdata;9structlist*next;10};1112//typedefstructlistnode;13//typedefstructnode*link;1415typedefstructlistnode;1617//typedefnode*link;//这样也行的。18typedefstructlist*link;1920//删除一个结点21link
阅读全文

浙公网安备 33010602011771号