"James Prato" <j.*****@hotmai l.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[]="ABCDEFGHIJKLM NOPQRSTUVWXYZab cdefghijklmnopq rstuvwxyz.\
\n",*q="kl BIcNBFr.NKEzjwC IxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+= strchr(p,*q++)-p;if(i>=(int)si zeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}