摘要: #include #include struct tells;//声明结构体 struct info { char *infos; }; typedef struct Books { char *name; int page; struct info *pinfo; struct tells *tel; }BK; struct tells{ char *age; }; void ... 阅读全文
posted @ 2018-03-14 22:12 王默默 阅读(11871) 评论(1) 推荐(1) 编辑
摘要: int *p = (int *)malloc(sizeof(int)) malloc函数会返回开辟空间的首地址,加(int *)的目的是让计算机知道,如何去划分这个开辟的空间, 因为char、int 、long这些类型的字节大小是不一样的,我们知道了首地址, 还要知道是以几个字节为单元。 所以,这句 阅读全文
posted @ 2018-03-14 18:12 王默默 阅读(16177) 评论(0) 推荐(0) 编辑
摘要: 一、光标的移动0: 移动到行首。$: 移动到行尾。w: walk移动到下一个单词b: back 移动到上一个单词h或退格: 左移一个字符;后退l或空格: 右移一个字符;前进j: 下移一行;k: 上移一行; shift + g: 移动到页尾 gg:移动到页头开始位置 二、翻屏ctrl+f: 下翻一屏。 阅读全文
posted @ 2018-03-14 15:58 王默默 阅读(322) 评论(0) 推荐(0) 编辑
摘要: #include #include struct Books { char title[50]; //char author[100]; //int book_id; }; int main(){ struct Books b1; strcpy(b1.title,"C语言"); struct Books *p1; p1 = &b1; strcpy(p1->title,"Ja... 阅读全文
posted @ 2018-03-14 10:07 王默默 阅读(536) 评论(0) 推荐(0) 编辑