.dat file knowledge

Pages: 123
Sep 14, 2013 at 5:53pm
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 Sep 14, 2013 at 5:53pm
Sep 15, 2013 at 2:56am
Yes create a text file as above and save it with a .dat extension instead of .txt.
Sep 19, 2013 at 11:52am
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
Sep 19, 2013 at 12:11pm
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.
Sep 20, 2013 at 2:28pm
Thanks... I guess It is solved finally...
3 Pages Thanks to all of you!!

BTW nothing personal with the grade:
recalibrate F
Sep 24, 2013 at 2:39am
What grade did I get? I helped to er, well I put effort into this and that's all that matters!
Sep 26, 2013 at 11:14am
@RealGiganitris
You got A

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