gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sprintf usage


From: Cameron Laird
Subject: Re: sprintf usage
Date: Thu, 4 May 2006 20:16:48 +0000
User-agent: Mutt/1.5.11+cvs20060126

On Thu, May 04, 2006 at 10:06:20PM +0200, Pawel Kot wrote:
                        .
                        .
                        .
> OK, considering rewrite what would be the best way to reimplement:
> for I(i = 0; i < length; i++)
>    sprintf(buffer, "%s%d", buffer, input[i]);
> ?
                        .
                        .
                        .
  for (i = 0; i < length; i++) {
      sprintf(temporary, "%d", input[i]);
      strcat(buffer, temporary);
  }
Another possibility:
  for (i = 0; i < length; i++) {
      itoa([input[i], buffer + strlen(buffer), 10);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]