View Single Post
Re: Bitz and Bytes , saving with fWRITE
Old
  (#4)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: Bitz and Bytes , saving with fWRITE - 21-01-2004

well if the problem is writing large amounts of data in a row, why don't you split it ? for example, start at &cVisTable[0] and write 500 bytes. Then start at &cVisTable[500] and write another 500 bytes. Then start at &cVisTable[1000] and do this again and again until you've reached the end of cVisTable, that is, iSize.

Also please note that with fread() and fwrite() there is a difference between:
fread(cVisTable, iSize, 1, rbl);
and
fread(cVisTable, 1, iSize, rbl);
in the first case you read ONE block of iSize bytes in a row, in the second case you read iSize times one byte, calling the file I/O subroutines iSize times. You might want to read smaller blocks but in a greater amount...



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote