Surprisingly, this is a beginner project that I am completely unable to find a good example of or anything really. I am going back to school after some years off and I'm doing little things to get back into coding. I couldn't find anything like this as a beginner exercise so here is where I am. If you run it, you'll see that the end of the bar doesn't show at first. I don't see where my error is. If I uncomment the arrow and take out the spinner, it works perfectly. For some reason the spinner makes the end bracket not show the first run of the spinner. Help!
Your code is very nearly idiomatic C. Some things can be changed to make your program shorter. In particular, most of the loops can be replaced with the fill constructor of std::string, and most variable declarations can be brought into inner scopes. C++ doesn't require that variable declarations are placed anywhere special, and so they should be given as narrow a scope as possible.