
c.数据结构
Xuan-ZY
文章含有笔记字样的仅供参考,属于个人学习笔记
展开
-
C语言链表运用---学生管理系统
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<conio.h> #define max 20 typedef struct student //学生 { char sno[max]; // 学号 char sname[max]; //姓名 char sex[max]; //性别 char age[max]; //年龄 char depart[max]原创 2020-05-31 17:45:00 · 654 阅读 · 1 评论 -
贪吃蛇笔记.c(链表学习)
gotoxy光标函数 void gotoxy(int x, int y) { // 更新光标位置 COORD pos; HANDLE hOutput = GetStdHandle(STD_OUTPUT_HANDLE); pos.X = x; pos.Y = y; SetConsoleCursorPosition(hOutput, pos); // 隐藏光标 CONSOLE_CURSOR_INFO cursor; cursor.bVisi原创 2020-05-31 15:08:09 · 466 阅读 · 0 评论 -
c.链表学习笔记
链表 (1)malloc函数主要作用是分配一块长度为size的内存空间。void *malloc(unsigned int size);其中,size就是要分配的内存空间大小字节。使用时最好先检查一下是否分配成功,否则返回null,可以保证程序的正确运行。使用完分配后的空间要利用free函数及时释放。 (2)free函数主要作用是将内存空间释放。void free (void *p); 其中,参数p指向要释放的内存空间。不能使用已经被free函数释放的内存空间 创建链表 typedef struct stu原创 2020-05-24 21:43:17 · 287 阅读 · 0 评论