On 25-Jul-97, Wade Carpenter wrote to All about Me again.. HEEEELPPPP!! It's
broken!.
This is a C question, please remit to C_ECHO next time...
WC> #include
WC> void main(void)
WC> {
WC> FILE *fp;
WC> char msg[88];
WC> char fspec[50];
WC> fp = fopen("ZS.CFG","wt");
Hey! the "t" modifier isn't standard!
WC> fp = fopen("zs.cfg", "w");
WC> fwrite(gets(msg),88,1,fp);
WC> fwrite(gets(fspec),50,1,fp);
You shouldn't use gets(), try fgets().
WC> fwrite(fgets(msg, sizeof(msg), stdin), sizeof(msg), 1, fp);
WC> fwrite(fgets(msg, sizeof(fspec), stdin), sizeof(fspec), 1, fp);
WC> fclose(fp);
WC> printf("Done!\r\n");
printf("Done!\n");
WC> }
Javier Kohen [The_Crusher] http://jkohen.base.org
... Can I yell "Evolution!" in a crowded Religion conference?
-!- CrusherTag 0.3.2.
--- Terminate 4.00/Pro
---------------
* Origin: The King of The Ring (4:900/748.3)
|