c/c++读写照片数据

void write_JPG(CString path, char *buf, long size)
{
FILE *pw;
pw = fopen(path, "wb");
fwrite(buf, sizeof(char), size, pw);
fflush(pw);
fclose(pw);
}
void write_Text(CString path, CString data, long size)
{
FILE * fp = fopen(path, "w+");
if (fp == NULL)
{
return;
}
DWORD bytes = data.GetLength();
fwrite(data, data.GetLength(), 1, fp);
fclose(fp);
}

猜你喜欢

转载自blog.csdn.net/xmmdbk/article/details/80108895