.dat file knowledge

Pages: 123
If you simply want to create a file containing text like this, then all you need is an ordinary text editor.
Albocoder B
vin A
Lumpkin C
recalibrate F


For some other more complicated types of data, one way would be to write a very short c++ program to write the required data to the file.
Last edited on
Yes create a text file as above and save it with a .dat extension instead of .txt.
Does the extension of the file matter if when i open it in notepad I see the text like this:


Albocoder B
vin A
Lumpkin C
recalibrate F



Tell me can the program in C++ read the .dat files text
C++ doesn't care about either the file name or its extension. It will behave in the same way no matter what the file is called.

The only thing to decide is whether to open the file in text mode (which is the default) or binary mode. In this case, I would say use the normal text mode, as that matches the type of data contained in the file.
Thanks... I guess It is solved finally...
3 Pages Thanks to all of you!!

BTW nothing personal with the grade:
recalibrate F
What grade did I get? I helped to er, well I put effort into this and that's all that matters!
@RealGiganitris
You got A

:D
Topic archived. No new replies allowed.
Pages: 123