C ++ visualization for understanding this

I am a student studying C ++ at school now. We use Dev-C ++ for small, short exercises. Sometimes it’s hard for me to understand where I made a mistake or what really happens in the program. Our teacher taught us how to make drawings. They can be useful when working with linked lists and pointers, but sometimes my drawing is wrong.

(example of a drawing that renders a linked list: nl.wikibooks.org/wiki/Bestand:GelinkteLijst.png)

Is there any software that could interpret my C ++ code / program and visualize it (for which pictures are for me)? I found this: link text

other links: cs.ru.ac.za/research/g05v0090/images/screen1.png and cs.ru.ac.za/research/g05v0090/index.html

This is similar to what I need, but not available for any download. I tried to contact this person, but did not receive a response.

Does anyone know such software? May be useful for other students, and I think ...

Yours faithfully,

SFD

+4
source share
4 answers

This is not related to the actual name, but I would like to make a simple suggestion on how to understand what is happening in the program.

I don’t know if you looked at the debugger, but this is a great tool that can greatly improve your understanding of what is going on. Depending on your IDE, it will have more or less functions, some of which should include:

  • view the current call stack (lets you know which function is calling what)
  • view the current available variables along with their values
  • allows you to walk step by step and see how each value changes.
  • and many, many others.

Therefore, I would advise you to spend some time studying the entire debugger for your IDE and start using all these features. Sometimes a lot of other things happen, and then just click Next. Some things may include dynamic code evaluation, return in time, etc.

+6
source

See DDD . This is a graphical interface for debuggers.

Try the debuggers in general to understand what your program does, they can go through your code step by step.

+2
source

Doxygen has, if I remember, the basic form of this, but this is really only a secondary feature of the much larger library, so this may be redundant for what you want. (Although this is a great documentation program!)

+1
source

Reverse engineering code on some kind of chart will have limited IMO benefits. The best approach to understanding program flow is the code step in the debugger. If you are not using a debugger yet, you should; it is a more suitable tool for this particular problem.

Reverse engineering code for diagrams is useful when reusing or saving undocumented or poorly documented legacy code, but it rarely reveals the constructive meaning of the code because it lacks the abstraction that you would use when designing the code. You do not need to resort to such things in the new code that you just wrote! In addition, tools that do this even moderately well are expensive.

Do you have to think that you can avoid the design, and just insert an automatically generated diagram, is not necessary. It will be more than obvious that this is an automatically generated chart!

0
source

All Articles