tags:

views:

936

answers:

5

I have an old C++ code with multiple nested if else

Is there a tool that will take C++ code and produce a flow chart ? a free tool will be the best ;-)

A: 

If you feel the need to use flowcharts with C++ (or, I'm tempted to say, at all), you are probably not doing OOP. The behaviour of C++ programs tends to be determined dynamically at run-time, by creating instances of different classes, and such behaviour does not suit to being diagrammed with flowcharts. However, there are some tools out there (I've used none of them) - Google for "C++ flowchart tool"

anon
I got stuck with this code, I have to understand whats going on there as quickly as possible
Dan
Flow chart is not a good tool for this - take a look at Doxygen to get a good overview of program structure.
anon
i did it helped a little but , there is a function with something like a hundred nested if else in there. doxygen is no help with that
Dan
A: 

I haven't used any but a Google Search with 'code to flowchart' as keyword returns many results. Choose one you like.

Christy John
there are many results but most of the tools are very pricey, I wont be able to get the budget for them :-(
Dan
Sorry, I couldn't help.
Christy John
thanks for trying
Dan
+1  A: 

There are some alternatives available on SourceForge, one of them is C Algorithm Viewer
Ok, for C++ but in Linux :
Medoosa - Medoosa is a documentation tool for C++ that can produce UML class diagrams including generalizations and associations.
cpp->dia - "cpp->dia" aka "cpp2dia" has been developed to create UML diagrams for the diagram creation program "Dia" from an existing C++ source.

lsalamon
Question is about C++, not C.
anon
+1  A: 

There is one called Understand from SCItools but it is not free

Himanshu
+1  A: 

I am not aware of any free tool, but you might be able to get started with a trail-ware tool, it will get you going, and if it will make such a difference for you you can state it as business case to get your manager to cough out the budget to buy it.

I once used this tool to demonstrate why multiple nested if-else are such a bad idea (it worked too ;-) ) it will give you most of the functionality you need for free for a few days

Alon