ulltostr

M

Mike

Hello,
Can someone tell me how to use the ulltostr function?
This converts a long int to a string.
Can someone show me a short piece of code? Thanks.
 
J

Jordan Abel

Hello,
Can someone tell me how to use the ulltostr function?
This converts a long int to a string.
Can someone show me a short piece of code? Thanks.

My system doesn't have such a function.
 
D

David Resnick

Mike said:
Hello,
Can someone tell me how to use the ulltostr function?
This converts a long int to a string.
Can someone show me a short piece of code? Thanks.

ulltostr is not in standard C. Perhaps you should check the manuals
on your system (try "man ulltostr" if this is Solaris as I'd guess) or
ask
in a newgroup dedicated to that OS. comp.unix.solaris or
comp.unix.programmer perhaps?

-David
 
R

Richard Heathfield

Mike said:
Hello,
Can someone tell me how to use the ulltostr function?
This converts a long int to a string.
Can someone show me a short piece of code? Thanks.

There is no ulltostr function in standard C, but it's easy enough to write
one that matches your specification.

#include <stdio.h>

int ulltostr(char *s, long int n)
{
return sprintf(s, "%ld", n);
}

Followups set.
 
K

Keith Thompson

Richard Heathfield said:
Mike said:

There is no ulltostr function in standard C, but it's easy enough to write
one that matches your specification.

#include <stdio.h>

int ulltostr(char *s, long int n)
{
return sprintf(s, "%ld", n);
}

Followups set.

<OT>But that's not consistent with the Solaris function of the same
name.</OT>
 
R

Randy Howard

Keith Thompson wrote
(in article said:
<OT>But that's not consistent with the Solaris function of the same
name.</OT>

OnTopic: But, since there is no standard function of that name,
there is no need for conforming code posted to CLC to adhere to
some non-standard implementation on a given platform.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,230
Latest member
LifeBoostCBD

Latest Threads

Top