问题描述
大家好......
我的代码出了问题,当我这样说时:
recsize = sizeof (p1);
fseek(fp,-recsize,SEEK_CUR); fwrite(& p1,sizeof(p1),1,fp);
getch();
文件保存时的值正确且有些windows信息
呢!?
喜欢这个 8? ?我想知道我是谁。 E x e l& ? P $ / $
roduct N am e
有什么问题?!
Kisses
Hello everyone...
I′ve a problem with my code, when i put this lines:
recsize = sizeof(p1);
fseek(fp,-recsize,SEEK_CUR); fwrite(&p1,sizeof(p1),1,fp);
getch();
The file was saved with correct values and with some windows informations
too!?
like this " 8 O r i g i n a l F i l e n a m e C m d . E x e l & P
r o d u c t N a m e"
what are the problem?!
Kisses
推荐答案
显示您正在使用的实际代码,而不是它的片段。
简化代码,直到您拥有最小的完整工作代码为止
演示了这个问题。
作为一个疯狂的猜测,你可能会尝试使用fread读取OLE复合文件
,这注定要幽默。
Show the actual code you are using and not a snippet of it.
Simplify the code until you have the minimal fully working code that
demonstrates the problem.
As a wild guess, you might be trying to read an OLE compound document
using fread, which is destined to humor.
显示您正在使用的实际代码,而不是它的片段。
简化代码,直到您拥有最小的完整工作代码为止
演示了这个问题。
作为一个疯狂的猜测,你可能会尝试使用fread读取OLE复合文件
,这注定要幽默。
Show the actual code you are using and not a snippet of it.
Simplify the code until you have the minimal fully working code that
demonstrates the problem.
As a wild guess, you might be trying to read an OLE compound document
using fread, which is destined to humor.
或p1指向一个带指针的结构... fwrite()显然不会
序列化结构中的字符串指针。
也可能是字节填充?谁知道。
or p1 points to a struct with pointers... fwrite() obviously won''t
serialise string pointers in a struct.
maybe also byte padding? who knows.
显示您正在使用的实际代码,而不是它的片段。
简化代码,直到您拥有最小的完整工作代码为止
演示了这个问题。
作为一个疯狂的猜测,你可能会尝试使用fread读取OLE复合文件
,这注定要幽默。
Show the actual code you are using and not a snippet of it.
Simplify the code until you have the minimal fully working code that
demonstrates the problem.
As a wild guess, you might be trying to read an OLE compound document
using fread, which is destined to humor.
这篇关于使用fseek的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!