*.DAT files?

This is a discussion on *.DAT files? within the C++ Programming forums, part of the General Programming Boards category; I've got two questions about these: 1.) Is it possible to read and edit these files using C++. And does ...

  1. #1
    Registered User
    Join Date
    Nov 2001
    Posts
    44

    *.DAT files?

    I've got two questions about these:

    1.) Is it possible to read and edit these files using C++. And does anyone have any example source code for doing this.

    2.) Does anyone know a program that I can have a look at these files. As when I try to open the documents from Windows it just says I doont have a program that can open DAT files.
    I'm using Bloodsheds Dev-C++ Compiler.

    JamMan..

    Curious if I can live forever? CLICK HERE

  2. #2
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    unfortunately the extention .dat is multi-formated... but if by coincidence you are using allegro and it's grabber utility, the grabber can read those packed files... if not, then ignore...
    hasafraggin shizigishin oppashigger...

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    44
    Forgive the thickness and the lack of computer and programming knowledge, but whats Allegro??

    I'll try an explain better. I have got *.DAT files containing information that I would like to use in my program, but don't know if its possible.
    Also is there a windows program for reading these files, because notepad won't.
    I'm using Bloodsheds Dev-C++ Compiler.

    JamMan..

    Curious if I can live forever? CLICK HERE

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    *.DAT files can contain anything. You must know in which format the files are in order to read them.

  5. #5
    Registered User
    Join Date
    Nov 2001
    Posts
    44
    How can I tell which format the are in? Is it possible to email someone a couple as attachments, you could use the email button on this BB to send me your email add. So they can have look and tell us. And then advise me if I can incoporiate these into my programming or look at the contents?

    Thanks for all the help.
    I'm using Bloodsheds Dev-C++ Compiler.

    JamMan..

    Curious if I can live forever? CLICK HERE

  6. #6
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    well, it's arbitrary... where did you recieve these files? then maybe we can help you with a format better...
    hasafraggin shizigishin oppashigger...

  7. #7
    Registered User
    Join Date
    Nov 2001
    Posts
    44
    They are *.DAT files of a footbal management game for the PC. They contain player names, data, etc..
    I wold like to make a program that can read this data and then edit it so I can make it more upto date.
    I'm using Bloodsheds Dev-C++ Compiler.

    JamMan..

    Curious if I can live forever? CLICK HERE

  8. #8
    Registered User
    Join Date
    Sep 2001
    Posts
    164
    Then, you'll have to figure out how it works!
    // Gliptic

  9. #9
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,767
    You'll need a hex editor to start with
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  10. #10
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    another tip

    Some data files (especially *.INI files) can be opened in Notepad for editing. Try that, you might have luck...
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  11. #11
    Registered User
    Join Date
    Nov 2001
    Posts
    44
    Already tried Word Pad, but the text appears as:
    ■■ ■ ■ DavidąQ■ ■ ■   CarlQ■ ...

    When what I wanted was:
    David
    Carl

    Salem, whats a hex editor and where can I get one?
    I'm using Bloodsheds Dev-C++ Compiler.

    JamMan..

    Curious if I can live forever? CLICK HERE

  12. #12
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,767
    A selection
    http://directory.google.com/Top/Comp...s/Hex_Editors/

    Try some of the download sites like www.download.com

    > ■■ ■ ■ 
    These will be integers - say a score, or a string length, or ....
    Look at these using the hex editor, and with patience, you should be able to figure out what the file means.

    At least it doesn't seem to be compressed or encrypted.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  13. #13
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    lol, well i must say that for this i am thankful for not applying the DIY method i usually flaunt being a dosfreak...
    hasafraggin shizigishin oppashigger...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Error opening files in a different dir
    By Ozzie in forum C++ Programming
    Replies: 3
    Last Post: 10-09-2008, 07:55 AM
  2. Working with muliple source files
    By Swarvy in forum C++ Programming
    Replies: 1
    Last Post: 10-02-2008, 09:36 AM
  3. Program Deployment and DLL/OCX Files?
    By dfghjk in forum C++ Programming
    Replies: 5
    Last Post: 06-16-2008, 03:47 AM
  4. Batch file programming
    By year2038bug in forum Tech Board
    Replies: 10
    Last Post: 09-05-2005, 04:30 PM
  5. JetAudio won't play .dat files
    By LogicError in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 05-25-2005, 09:35 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21