thanks. looks like what I needed, though sprintf might serve a better purpose.


Thanks,
Tyler Littlefield
email: [EMAIL PROTECTED]
web: tysdomain-com
Visit for quality software and web design.
skype: st8amnd2005

  ----- Original Message ----- 
  From: Brett McCoy 
  To: [email protected] 
  Sent: Sunday, November 23, 2008 5:58 PM
  Subject: Re: [c-prog] print number in string


  On Sun, Nov 23, 2008 at 7:51 PM, Tyler Littlefield <[EMAIL PROTECTED]> wrote:

  > I'm used to c++ where I can just use a simple stringstream and print the
  > number to the stream.
  > Unfortunately for me, I'm using c now, and need to be able to print a number
  > in a string.
  > Basically, I'm writing a time conversion util; it takes the number of
  > seconds and converts them to weeks,days,hours,minutes and seconds.
  > So, I need to print the number of each denomination to a buffer.

  Read up on printf(), it's the canonical function call from stdio.h for
  printing formatted strings.

  -- Brett
  ----------------------------------------------------------
  "In the rhythm of music a secret is hidden;
  If I were to divulge it, it would overturn the world."
  -- Jelaleddin Rumi


   

[Non-text portions of this message have been removed]

Reply via email to