opening DAG file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nomee919
    New Member
    • Oct 2008
    • 2

    opening DAG file

    I have a DAG (Direct Acyclic Graph) file and when directly open in C++, shows following:

    processors 16;
    comp 287 comma 129 commb 2430450;
    taches 382;
    10000,0:0;
    10000,0:100;
    10000,0:101;
    ....
    ....
    ....

    Can any1 plz tell me how to open this file in C++ because after opening I need to work on the values it has. I know how to open a .txt file but how can I open this kind of file?
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Is it an ASCII file or a binary file?
    You have doubts in the calls you should use or having problems in accessing the values?

    raghu

    Comment

    • nomee919
      New Member
      • Oct 2008
      • 2

      #3
      Originally posted by gpraghuram
      Is it an ASCII file or a binary file?
      You have doubts in the calls you should use or having problems in accessing the values?

      raghu
      I don't know whether its ASCII or binary file. I think atleast its not either of them. Its a file when i open it with .net, shows the following contents which i posted earlier. First i was opening it in .txt format and was working on it but Ive been told that it is a C file or you have to open it in C++ to work on. First i have to know how to call this file in C++, then ill most probably work on the values inside.

      Comment

      • weaknessforcats
        Recognized Expert Expert
        • Mar 2007
        • 9214

        #4
        There is no difference between a C file and a C++ file. However, there is a difference between a text file and a binary file.

        Question: Can you open this file and edit it with a text editor?

        If yes, you have a text file. Here the data is individual ASCII text characters. Typically, each record has a \n terminator. You read an write these files by character using the \n to detect the end fo record.

        If no, you have a binary file. Here the data is written in bytes. You read this file based on a number of bytes that you put directly into a variable or an array of variables.

        In C and C++ you open file in text or binary mode as necessary.

        Comment

        Working...