Thread: int to char array

  1. #1
    Unregistered
    Guest

    int to char array

    I want to convert an integer of unspecified value into a character array in which each digit of the integer occupies a single place in the array (i.e. (int)5426 -> { '5', '4', '2', '6' }). I want to be able to manipulate these numbers both as integers and as part of a larger character string. Any suggestions?

  2. #2
    Registered User The Dog's Avatar
    Join Date
    May 2002
    Location
    Cape Town
    Posts
    788
    Lookup the function itoa() declared in <stdlib.h>

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  2. memory leak
    By aruna1 in forum C++ Programming
    Replies: 3
    Last Post: 08-17-2008, 10:28 PM
  3. Replies: 3
    Last Post: 05-13-2007, 08:55 AM
  4. Converted from Dev-C++ 4 to Dev-C++ 5
    By Wraithan in forum C++ Programming
    Replies: 8
    Last Post: 12-03-2005, 07:45 AM
  5. My graphics library
    By stupid_mutt in forum C Programming
    Replies: 3
    Last Post: 11-26-2001, 06:05 PM