• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






luwudang

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2018年10月11日

realloc() 的一点小技巧
摘要: 参考: http://www.cplusplus.com/reference/cstdlib/realloc/ https://www.geeksforgeeks.org/how-to-deallocate-memory-without-using-free-in-c/ 函数原型: 如果 ptr = 阅读全文
posted @ 2018-10-11 10:11 luwudang 阅读(131) 评论(0) 推荐(0)
 

2018年10月10日

realloc简单用法
摘要: 结果: 1 2 31 2 31 2 3 realloc() should only be used for dynamically allocated memory. If the memory is not dynamically allocated, then behavior is undef 阅读全文
posted @ 2018-10-10 09:38 luwudang 阅读(453) 评论(0) 推荐(0)
 

2018年9月28日

vim输出高亮代码到office
摘要: 主要参考:(这里作个备忘) https://jingyan.baidu.com/article/b0b63dbfcf33814a4930704f.html 1、 使用 vim 自带的 :TOhtml 命令输出 html 文档 2、 w 保存 html 文档 3、 然后打开这个 html 文档 4、 阅读全文
posted @ 2018-09-28 11:35 luwudang 阅读(315) 评论(0) 推荐(0)
 

2018年9月22日

c.vim
摘要: " Vim syntax file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> " Last Change: 2016 Nov 18 " Quit when a (custom) syntax file was already 阅读全文
posted @ 2018-09-22 13:56 luwudang 阅读(338) 评论(0) 推荐(0)
 
printf的转换说明要注意的几点
摘要: - // 左对齐,默认右对齐 + // 显示符号,正数显示 + ,负数显示 - 空格 // 正数显示空格,负数显示 - %% // 打印 % 0 // 不足宽度的,在前面补 0 Result: 转换说明(conversion specification): 把二进制格式存储在计算机中值转换成一系列字 阅读全文
posted @ 2018-09-22 13:54 luwudang 阅读(440) 评论(0) 推荐(0)
 
vim-tricks
摘要: K 打开光标下单词的man页 J 连接2行 dl 删除一个字符 daw 删除一个单词 dap 删除一个段落 g~ 转换大小写 guaw 把整个单词转换成小写 gUaw 与上面相反 dap 删除整个段落 guap ... gUap ... cc 修改当前行 (删除这一行,然进入插入模式)不论光标在哪里 C 与 cc 不一样,C 是删除光标位置到行尾,跟光标位置有关 dd 删除当前行 >> ... 阅读全文
posted @ 2018-09-22 10:53 luwudang 阅读(130) 评论(0) 推荐(0)
 

2018年9月17日

simulate cat command
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main(int argc,char **argv) 5 { 6 FILE *fp; 7 8 //check command usage 9 if(argc != 2) 10 { 11 fprint 阅读全文
posted @ 2018-09-17 11:05 luwudang 阅读(157) 评论(0) 推荐(0)
 
use imagination0
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 int main(void) 5 { 6 FILE *fp; 7 /* char arr[100]; */ 8 9 //write sth to T.txt 10 fp = fopen("T.txt","w 阅读全文
posted @ 2018-09-17 10:44 luwudang 阅读(95) 评论(0) 推荐(0)
 

2018年9月16日

use imagination
摘要: 1 #include 2 #include //for EXIT_FAILURE,exit() 3 4 int main(void) 5 { 6 FILE *fp; 7 char arr[100]; 8 9 // write something to test file 10 fp = fopen("test","w"); 11 ... 阅读全文
posted @ 2018-09-16 00:10 luwudang 阅读(117) 评论(0) 推荐(0)
 

2018年9月14日

tar
摘要: Creating the Archive To place the files 'blues','folk' and 'jazz' into an archive named 'collection.tar',use the following command: Note: collection.t 阅读全文
posted @ 2018-09-14 13:48 luwudang 阅读(199) 评论(0) 推荐(0)
 
下一页