| | |
How can I write a program that writes to a text file?
Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Feb 2009
Posts: 93
Reputation:
Solved Threads: 0
Dear ALL,
Could you tell me how can I write a program that writes to a text file, the 32 people that are in our hotSeat.txt file.
Cheers,
turbomen
(p.s.: 'the question orginally ask me to write a program that writes to a text file, the 32 people that are in our hotSeat.dat file' but it is not possible for me to upload the *.dat file to here. So, I have make changes of the *.dat file to *.txt file before upload it.)
Could you tell me how can I write a program that writes to a text file, the 32 people that are in our hotSeat.txt file.
Cheers,
turbomen
(p.s.: 'the question orginally ask me to write a program that writes to a text file, the 32 people that are in our hotSeat.dat file' but it is not possible for me to upload the *.dat file to here. So, I have make changes of the *.dat file to *.txt file before upload it.)
first you have to know the record's field,if you know then you can use a for loop to write the guy to the file....
By the way,when we want to write records into a file then we do it with typed file,same typed as the record....
By the way,when we want to write records into a file then we do it with typed file,same typed as the record....
Be a good part of the community.Don't be ungrateful.
If you ask something on the forum and you got the right answer then mark as solved!
If my opinion helped to you a lot then sometimes give reputation point to me.
I'm just a pascal programmer from Hungary.
Farewell...
If you ask something on the forum and you got the right answer then mark as solved!
If my opinion helped to you a lot then sometimes give reputation point to me.
I'm just a pascal programmer from Hungary.
Farewell...
•
•
Join Date: Oct 2008
Posts: 16
Reputation:
Solved Threads: 3
Simple example...
Pascal and Delphi Syntax (Toggle Plain Text)
a_FileStream := TFileStream.Create(FFileName, fmCreate); try for a_Index := Low(a_RecordArray) to High(a_RecordArray) begin aStream.Write(Pointer(a_RecordArray[a_Index].LastName)^, length(a_RecordArray[a_Index].LastName)); end; finally a_FileStream.Free; end;
![]() |
Similar Threads
- reading a text file into array (C++)
- Text File I/O (C++)
- help reading a text file separated by comma's into different arrays (C++)
- Read a text file & store it in a Data Structure (C++)
- Problem Writing in Text File (C++)
- text file - stream object issues (C++)
- How can i write program that writes into a file from an array of string and reverse (C++)
- C++ hints to write a program, please help (C++)
- write to text file using fprintf() (C)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: C/C++ to Delphi
- Next Thread: How to spead a loop?
| Thread Tools | Search this Thread |





