如何找出文件的文本长度 [英] How to find out file's text length

查看:133
本文介绍了如何找出文件的文本长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想查看文件的'文本'长度(多少字母)。


我该怎么做????

I want to see the file''s text''s length (How Many Letters).

How Can I Do That????

推荐答案

如果您正在使用MSVC


GetFileSize


Alternitively


打开文件 - fopen

转到文件末尾 - fseek

获取文件位置 - ftell

关闭文件再次 - fclose
If You are using MSVC

GetFileSize

Alternitively

Open the file - fopen
goto the end of the file - fseek
get the file position - ftell
close the file again - fclose


:confused:我不明白。


???? :confused :: confused:
:confused: I don''t Understand.

???? :confused: :confused:


这些功能你可以在我在你的其他帖子中提供的链接中查找它们。


如果你正在使用WIN32,即在Windows平台上为Windows平台开发你可以调用


GetFileSize(...)


如果你不在Windows平台上或需要编写可移植代码然后你可以使用函数调用序列


fopen(...)

fseek(。 ..)

ftell(...)

fclose(...)


我建议你去看看这些功能的帮助。
Those are functions you can look them up in the links I provide in one of your other posts.

If you are using WIN32, i.e. developing on the Windows platform for the Windows platform you can call

GetFileSize( ... )

if you are not on the Windows platform or need to write portable code then you can use the sequence of function calls

fopen( ... )
fseek( ... )
ftell( ... )
fclose( ... )

I suggest you go and look up the help of these functions.


这篇关于如何找出文件的文本长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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