From: P.D. v. Z. <pa...@my...> - 2003-08-09 13:13:38
|
I assume you don't mean a part of the actual program code, but data entered while running your program. Depending on whether you use C or C++, you need to either do: (C code) FILE* out = fopen("somefilename", "wt"); /* or "wb" for binary files */ fprintf(out, "Blah blah blah"); /* for text files */ fwrite(buf, size_of_buf, number_of_items, out); /* for binary files */ fclose(out); OR (C++ code): #include <fstream> // .... std::ofstream out("somefile"); out << "Blah blah blah"; Hope this helped, Paul P.S.: Specifying a subject next time you ask a question would be nice, and giving your brain some exercise by searching for things yourself first would be even better. -----Original Message----- From: dev...@li... [mailto:dev...@li...] On Behalf Of yiwei li Sent: Saturday, August 09, 2003 1:58 PM To: dev...@li... Subject: [Dev-C++] (no subject) how can i save part of a programme in a file and able to retrieve it the next time when i run the programme? Get 10mb of e-mail space with MSN Hotmail Extra Storage at only S$36 per year including GST ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01 /01 _______________________________________________ Dev-cpp-users mailing list Dev...@li... TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm https://lists.sourceforge.net/lists/listinfo/dev-cpp-users |