From: lstar36 <ls...@fl...> - 2000-11-11 14:10:26
|
Corrected input: Sorry , in the first submission I forgot to put the "+" in the fopen statement. This allows both read & write. #include <stdio.h> #include <string.h> #include <stdlib.h> FILE *frw; void main(void); void main(void) { char save[51]; if ( (frw = fopen("fname.txt", "r+")) == NULL){ puts("Can not open winning database"); exit(0); } strcpy(save, "Hello World"); fwrite(save, sizeof(save), 1, frw); } ----- Original Message ----- From: "Shiva Kissoon" <sti...@ho...> To: <dev...@li...> Sent: Friday, November 10, 2000 6:48 PM Subject: [Dev-C++] (no subject) > hi, > i want to know how do i output to a text file > thanx > _________________________________________________________________________ > Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. > > Share information about yourself, create your own public profile at > http://profiles.msn.com. > > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > |