A progress bar in C

Hello, it's me again...:eek:
I need to create a progress bar in C, but i have no idea on how to do it.

i want it to output something like this:

Progress: [###########                    ] 58%

But i can't get it to work. Could you please post an example progress bar written in ANSI C?

Thanks

What have you tried so far? Have you look into ANSI codes for moving the cursor around?

Following pludi's directions - try this url

Ansi Escape Sequences

Hi, this is all i have done:

#include <stdio.h>

int  main(void) {
int i;
char *t="#";

for(i=0;i<=100;i++) {
        printf("[%s %d", t,i);
        printf("\r");
        fflush(stdout);
        usleep(59000);
        }
}

But this does not the work... i don't know, i need a way to increment the "#" in char t while counter is running or something like that...

jim, could you please show me an example with that escape sequences?
i'm can't understand that.

If i am asking is because i really dont find any information about it.

Thank you