|
-
February 10th, 2004, 04:15 PM
#1
Writes OK but doesn't Read very well?
Hi Boys 'n Girls-
Kin someone point out the problem with this code?
#include "stdafx.h"
#include <stdio.h>
int main(int argc, char* argv[])
{
FILE *Afile;
int xx=123456,yy;
Afile=fopen("d:Test.txt","wb");
fwrite(&xx,4,1,Afile);
rewind (Afile);
fread(&yy,4,1,Afile);
printf("\n Wrote: %d\n Read: %d\n",xx,yy);
_fcloseall();
return 0;
}
Thanks,
--------------------------------------------
http://www.volfirst.net/~sirjorj/index.html
---------------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|