This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
"C" beginner help ask:
- From: Gordiano <sagrav at racsa dot co dot cr>
- To: gcc-help at gcc dot gnu dot org
- Cc: rgonzalez at aya dot go dot cr
- Date: Mon, 11 Jun 2007 21:17:38 -0600
- Subject: "C" beginner help ask:
- Reply-to: sagrav at racsa dot co dot cr
I want to convert a one or few digits integer in a string, for example
5557..., so each one of the four digits be a char, then a char array of
five elements (including the null one) makes the string.
I've tried with "cast", char pointers to an array, etc... but no good
results.
=================================
/* gcc -Wall temp.c -o temp */
int main ()
{
int foo = 5557;
char *cfoo[5];
... ????
return 0;
}
=================================
thanks for help
misingo
www.astrocosas.com