文件的使用~~~~~~~~~~~~~~~~

sunfengasd 2006-10-17 06:57:40
用文件这个函数来做这道题:
破解Access2000的密码!!
高手来帮忙呀~!~!~
还有~!~!
就是fseek() 怎么使用 里面的参数详细说明一下~!~!~!
小弟~!~!谢谢各位高手了~!~!~!~
...全文
241 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
lele_nancy 2006-10-19
  • 打赏
  • 举报
回复
int fseek( FILE *stream, long offset, int origin );

FILE*stream: 文件指针
long offset: 相对于 origin的偏移量
int origin : 初始位置

Access2000的密码!!在文件的什么位置
飞哥 2006-10-19
  • 打赏
  • 举报
回复
破解Access密码?
没有什么意思
-------------
access本来就不是什么安全的东西
-------------

不懂你就问微软中国:)
飞哥 2006-10-18
  • 打赏
  • 举报
回复
fseek(stream,23L,SEEK_SET);
看参数
SEEK_SET 文件首

23L字节

就是说,文件指针移到从文件首开始的第23字节的位置
sunfengasd 2006-10-18
  • 打赏
  • 举报
回复
fseek(stream,23L,SEEK_SET);
23L是什么意思呀?????
这个偏移量怎么个使用呀~!~!~!~!
sunfengasd 2006-10-18
  • 打赏
  • 举报
回复
好了~!~!我自己能懂了~~!~!~!很好的~!~!
谢谢大家了~!~!~!
我太开心了`!~!~!~!
飞哥 2006-10-17
  • 打赏
  • 举报
回复
/* FSEEK.C: This program opens the file FSEEK.OUT and
* moves the pointer to the file's beginning.
*/

#include <stdio.h>

void main( void )
{
FILE *stream;
char line[81];
int result;

stream = fopen( "fseek.out", "w+" );
if( stream == NULL )
printf( "The file fseek.out was not opened\n" );
else
{
fprintf( stream, "The fseek begins here: "
"This is the file 'fseek.out'.\n" );
result = fseek( stream, 23L, SEEK_SET);
if( result )
perror( "Fseek failed" );
else
{
printf( "File pointer is set to middle of first line.\n" );
fgets( line, 80, stream );
printf( "%s", line );

}
fclose( stream );
}
}


Output

File pointer is set to middle of first line.
This is the file 'fseek.out'.


飞哥 2006-10-17
  • 打赏
  • 举报
回复
int fseek( FILE *stream, long offset, int origin );

FILE*stream: 文件指针
long offset: 相对于 origin的偏移量
int origin : 初始位置

33,311

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 新手乐园
社区管理员
  • 新手乐园社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧