M
M
MikhailTo2017-01-15 17:28:40
C++ / C#
MikhailTo, 2017-01-15 17:28:40

How to control the algorithm step by step (pause, back, forward)?

C++ (Visual Studio 2015)
Coursebook: algorithm execution demonstration (Radix LSD sorting).

Please help with advice, an example or a reference to the literature.
Google refers to articles about debugging ...
Maybe look in the direction of game programming?
Algorithm execution speed is controlled using
Thread::Sleep() and Application::DoEvents()
Nothing better.
And how to implement the control of the algorithm in steps has not yet thought of.
Here is the program window at runtime:
b302417a6d6b4270a36eff8fa9415219.PNG
In parallel, I'm trying to master d3js, but things are even worse there.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2017-01-15
@MikhailTo

It looks like you are sorting. And time sorting - that is a cycle. Let's say while. You wrap the entire body of the loop (without while!) in a method. The method works with global variable structures (for monitoring). When you need to perform the next step - call this method.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question