• 0

C++ Program Help


Question

hey guys, my teacher told me to make a program using loops to make |, \, / spin in a circle....i dont even know how to start.. so please help....if you dont know what i mean ill explain more... like cout | backspace than cout \ than backspace again than / and do it constantly and i should get a clockwise rotation of those 3 symbols

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

\b is the backspace character, just do a print statement with it and it'll delete the character before the place where the cursor is. Print |, then \b, then \\, then \b, then /, then \b and start the process over again.

Link to comment
Share on other sites

  • 0
is there anyway i can slow down the loop because its changing to fast.

584737515[/snapback]

You could put in a time loop:

//previous char

now = time(0);

while (time(0) < now+whatever);

//next char

That's if you want the pause in seconds, for milliseconds, there's another function.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.