[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-chat] int to char *array[ ].
From: |
Daniel O'Connor |
Subject: |
Re: [avr-chat] int to char *array[ ]. |
Date: |
Sun, 4 Oct 2009 22:22:32 +0930 |
User-agent: |
KMail/1.9.10 |
On Sun, 4 Oct 2009, markus järve wrote:
> Hello.
>
> I am having problem due to my limited knowledge of C.
>
> I have function readADC wich wil return value in integrer.
> Sadly the function LcdStr (wich is from Fandi Gunawan library for
> nokia 3310 lcd) accepts only char array pointers.
>
> So, i need to make int 123 into char *array[3] = 1, 2, 3
>
> I have been stuck on it for a day and have ran out of ideas. Maybe
> someone could point me to the right direction or help me figure it
> out.
char *array[3];
for (i = 0; i < 3; i++)
arrary[i] = readADC();
or perhaps..
char *array[3];
for (i = 0; i < 3; i++)
arrary[i] = readADC() + '0';
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
signature.asc
Description: This is a digitally signed message part.