如何将每个块分成4kb? [英] How can I divide each Block into 4kb?

查看:106
本文介绍了如何将每个块分成4kb?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好..我需要FILE的C实现分为块,每个Block分为4KB。如何将块分成固定大小(即4kb)..请有人给我解决我的问题....我需要C实现..

谢谢...

解决方案

这就是您所需要的:

http ://www.cplusplus.com/reference/cstdio/fread [ ^ ],

http://www.cplusplus.com/reference / cstdio / fopen [ ^ ],

http://www.cplusplus.com/reference/cstdio/fclose [< a href =http://www.cplusplus.com/reference/cstdio/fclosetarget =_ blanktitle =New Window> ^ ]。



而且,如果您还需要在其他文件中读取数据块,则可能需要使用s: http://www.cplusplus.com/reference/cstdio/fwrite [ ^ ]。



我从C ++帮助中引用了一些帮助页面,但不要混淆:它也适用于C.



-SA

Hello everyone.. I need a C implementation for FILE divides into blocks and Each Block divides into 4KB. How can I divide the block into fixed size (i.e 4kb).. Please anyone give me solution for my problem.... I need C implementation..
Thank you...

解决方案

This is what you need:
http://www.cplusplus.com/reference/cstdio/fread[^],
http://www.cplusplus.com/reference/cstdio/fopen[^],
http://www.cplusplus.com/reference/cstdio/fclose[^].

And, if you also need to read your data chunks in other files, you may need this: http://www.cplusplus.com/reference/cstdio/fwrite[^].

I referenced some help pages from C++ help, but don't be confused: it is also applicable to C.

—SA


这篇关于如何将每个块分成4kb?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆