#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    14
    Rep Power
    0

    read from file and generate to graph


    hi..
    i'd like to ask, is there anyway to treat a file as a database where we read particular data from the file and generate them on the graph using C language?
    If yes, can Microsoft Visual C++ do it?
    can MS-DOS run the reading file and the generation of the graphs?

    DO I need to use C++ together with C or
    C is enough?
    thanks ^_^
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    55
    Rep Power
    12
    C can achieve _EVERYTHING_ C++ can.

    It is not a matter of which compiler or library you link with (win32 api, vc++ compiler etc). All that you are doing is parsing/processing data, then outputting a binary file with all the required properties of the image format youwish to save it as (windows bitmap for example, has a bitmap header, bitmap information header, possible pallete, bitmap data).

    You could use an external library with image rendering routines, you can find these on google. The hardest part, if you are going to use someone elses image library, is processing the data properly (and securely).

    I don't think this is something you should bother trying to write yet, get to grips with basic file handling, pointers, structures etc.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    14
    Rep Power
    0
    erm...okay...yeah...i want to know the concepts first..
    Let's start with pointers...
    i read about stacks....and queues..
    for stacks, it is LIFO and queues is FIFO...
    but, I cannot get the idea where to apply these kind of things..
    why we need to insert in the middle? why do we need to insert at the end?

    Erm....in Microsoft, something like undo and redo...this is Stacks..am i correct?
    then, for printing...it is queues right? cause when we print a lot of stuff, they will print the first one we want to print.
    Then, what is insertion in the middle about?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    55
    Rep Power
    12
    Insertion in the middle allows doubly linked lists to be in-order, potentially speeding up searches (especially if the list pointer is central).

    Wwhen I said pointers I didn't mean using pointers to implement data structures, I meant to modify & parse file data once it's in memory.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    14
    Rep Power
    0
    if i want to display a simple graph (something line line graph) in MS-DOS....
    do I need to calculate the x,y axis?
    can I use dimensional array?
    if yes, how's the concept using dimensional array?

IMN logo majestic logo threadwatch logo seochat tools logo