- 注册时间
- 2011-3-6
- 最后登录
- 1970-1-1
该用户从未签到
|
#include <stdio.h>
#include <stdlib.h>
char* readFileBytes(const char *name)
{
FILE *fl = fopen(name, "r");
fseek(fl, 0, SEEK_END);
long len = ftell(fl);
char *ret = malloc(len);
fseek(fl, 0, SEEK_SET);
fread(ret, 1, len, fl);
fclose(fl);
return ret;
} |
|