49
Bob-
8y

Learning text animations in c++ be like:

Comments
  • 8
    Take that logic out to a function and call it
  • 3
    @bioDan look closely on the top left 😉
  • 8
    I mean the sleep and the string to a function and deal with it there.. Separate the string and treat it as an array of chars. Save the index of the uppercase char in the string. Downcase the string, and increment the next char in the string array to an uppercase using the index.
  • 3
    @bioDan totally understand..
    Totally not a newbie
    Totally not in need of a dummed down explanation

    (I am)
    (Also thank you)
  • 2
    Make a variable for the string of /bs at least.
  • 1
    What @killermenpl said.
  • 1
    @slowinversesqrt I haven't thought of that! Thank you, you just made my code not so ugly :)
  • 1
    Why all the \b and not \r?
  • 0
    \b makes it stay there even if the cursor was somewhere in between the screen. \r would make it go to the beginning
  • 1
    @Duckman use an array of chars, loop over each char and change it to uppercase according to the loop index
  • 1
    @bioDan

    I remember doing something like this but with a function that took arguments.

    looked something like

    void draw(to, from, paint, message) { . . .}

    where to and from is arr of x and y coor

    paint is an array of characters to alternate through while printing

    and message is the text to print when it reaches the destination.
  • 0
    "Hey everyone! I'm a student and I'm struggling with learning text animations in C++. I stumbled upon this conversation and was hoping to get some help. @bioDan, your explanation of using a function to separate the string and treat it as an array of chars makes sense to me. However, I'm still having trouble implementing it. I've been searching for tutorials online, but I think I need some hands-on guidance. That's why I was looking for a review of PaperDon, a service that offers custom assistance and read some review at https://edureviewer.com/services/... page. Has anyone used PaperDon before? Can you share your experiences with me? Any help or advice would be greatly appreciated!
Add Comment