![]() |
| ||
| data file help i need to be able to add data to my .dat file without deleting my old data during a program run can anyone help me? |
| ||
| Re: data file help Quote:
If this is a console app (DOS program) or UNIX program that outputs to standard output, you could redirect the output to your data file program.exe >> datafile.dat If this is a Windows program, you can use CreateFile with the following arguments HANDLE hFile = INVALID_HANDLE_VALUE; This returns a HANDLE that you can pass to ReadFile and WriteFile Using SetFilePointer if you need to position to any part of the file. if (hFile != INVALID_HANDLE_VALUE) Be sure to close the file with CloseHandle(hFile); Hope this helps. |
| All times are GMT -4. The time now is 8:23 am. |
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC