Re: How to decipher a large program.



Chad wrote:
I recently downloaded a program that inserts captions in .jpeg files.
However, I'm sort of at a loss on where to start to see how it
works.The program has 3 c files and 4 header files. In the header
files, the
person comments on what function is supposed to do.

The question is, how do I figure out how each of these functions
interact with each other? Do I just get
a pen/paper and start jotting down notes? I was maybe thinking of
constructing some kind of flow
diagram to see how these functions interact. Any ideas?

Starting from "main" can be useful, so can starting by debugging.
Often in a C program there is an include file with the same name as the
program which contains the most central definitions. This can also be
a good place to start.

.



Relevant Pages

  • How to decipher a large program.
    ... I'm sort of at a loss on where to start to see how it ... works.The program has 3 c files and 4 header files. ... diagram to see how these functions interact. ...
    (comp.programming)
  • Re: How to decipher a large program.
    ... works.The program has 3 c files and 4 header files. ... diagram to see how these functions interact. ... grep to locate comments relevant to what you're looking for, trace the library or system calls the program makes, or use a profiler to create dynamic flow graphs. ... Code Quality: The Open Source Perspective ...
    (comp.programming)
  • Re: help on file editing
    ... > manage the files like editing file content, modifying file content, ... > and deleting file contents. ... > My question is what sort of header files i need to open a files, ... > what sort of function i can used to input/output a file content, ...
    (comp.lang.cpp)