On Tue, Sep 8, 2009 at 16:40, Randi Botse<nightdecoder@xxxxxxxxx> wrote: > hi all, Hi, > > while (bytes < size) { : > > progress = (int) ((bytes / size) * 100); This is an integer division, and because bytes is always smaller than size will result in 0. You should cast bytes to double, or multiply by 100 first and than divide by size. Bert -- To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html