|
From: lstar36 <ls...@fl...> - 2000-11-11 13:19:34
|
Here is a sample of one way towrite to a text file . There areseveral other
ways. See your documentation.
#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
>
|