C语言基础
文章平均质量分 64
糊糊姨
这个作者很懒,什么都没留下…
展开
-
C语言基础--读文件
从一个文件中读取数据到一块buffer中 fp = fopen(file_path, "r"); if(fp == NULL) return -1; fseek(fp, 0, SEEK_END); unsigned int length = ftell(fp); rewind(fp); if(!(buf = malloc(length)原创 2017-09-15 21:14:56 · 467 阅读 · 0 评论 -
C语言基础--利用json文件load config信息
如果依赖json-c库jason文件格式:{ "achievement" : [ "ach1", "ach2", "ach3" ], "age" : 23, "name" : "Tsybius", "partner" : { "partner_age" : 21, "partner_name" : "Galatea", "partner_se原创 2017-09-17 10:44:40 · 624 阅读 · 0 评论 -
C语言基础--测试程序中实现对FPS的控制
const int FRAMES_PER_SECOND = 25;const int SKIP_TICKS = 1000 / FRAMES_PER_SECOND;DWORD next_game_tick = GetTickCount();// GetTickCount() returns the current number of milliseconds// that have ela原创 2017-10-11 21:41:04 · 1627 阅读 · 0 评论