I've done something like this this:
#include <thread>
int main(int argc, char *argv[])
{
//...
std::thread sad_thread(MakeMeFeelSad(), params);
sad_thread.join();
//...
std::thread happy_thread(MakeMeFeelHappy(), params);
happy_thread.join();
//...
}
Functions MakeMeFeelSad
and MakeMeFeelHappy
runs for about 2 mins each, I need to make in cmd something like this: I'm getting Sad/Happy..... (while functions are running)- And dots always appear until 5, then they disappear, and appear again. It's like progress bar with the dots. How can I make this ?
ETA: I mean do I need another one thread with callback ?