[Solved] Drawing a graph using executing time of a function in c++


Standard C++11 or C++14 does not have any graphics library.

But you should consider using Qt, a free software cross-platform GUI library for C++. I guess that you’ll be happy in using Qt graphics view framework. You could also consider some other, perhaps OS specific, widget toolkit. Or just output a 2D graphics using libcairo.

Another possibility might be to output some textual file (for GNUplot, in JSON, in SVG, for some spreadsheet in CSV, etc…) and use some external program to display that graph (in textual format). You could even use some inter-process communication (e.g. some FIFO or pipeline, with _popen or better) between them.

BTW Windows is AFAIK not a real-time OS, but you don’t really need real-time as you commented, you just need some interactivity. IMHO pipelining to GNUplot is very easy (at least on Linux, and probably on Windows too….).

2

solved Drawing a graph using executing time of a function in c++