"James Prato" <j.*****@hotmail.comwrites:
In C, how do you read data fields from a file that are separated/delimited
by a chr(255)?
You could read characters with fgetc() until you encounter a
character with value 255. (In C, we don't use your "chr"
notation; perhaps you are more familiar with Pascal or Perl than
with C.)
Have you tried writing code to do this? What difficulties did
you encounter? It is quite straightforward.
--
int main(void){char p[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuv wxyz.\
\n",*q="kl BIcNBFr.NKEzjwCIxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+=strchr(p,*q++)-p;if(i>=(int)sizeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}