Complete.Org: Mailing Lists: Archives: discussion: May 2000:
[aclug-L] Re: C question or Sometimes it's the simplest things...
Home

[aclug-L] Re: C question or Sometimes it's the simplest things...

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ACLUG <discussion@xxxxxxxxx>
Subject: [aclug-L] Re: C question or Sometimes it's the simplest things...
From: John Phillips <jphillip@xxxxxxxxxxxxx>
Date: Sat, 6 May 2000 13:44:34 -0500 (CDT)
Reply-to: discussion@xxxxxxxxx

Look up the 'ltoa' function.  The third paramater is radix, '2' for
binary.  The first paramater is the 'long value' to be converted. 
The second parameter is a pointer to a 'char buffer' big enough to
hold the conversion + a 'C' end-of-line. Better to be big on this
buffer than 1 char to small.
John Phillips


On Fri, 5 May 2000, Larry Bottorff wrote:

> I need to take an int and convert it to store/display as a binary
> string. That is, if I have 35 in need to store it as the char array
> 100011. Is there some simple function I'm not aware of?
> 
> Larry Bottorff
> 
> -- This is the discussion@xxxxxxxxx list.  To unsubscribe,
> visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi
> 


-- This is the discussion@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


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