Thread: int --> char, 2 ints in einem char array zusammenfügen, char array länge bestimmen

  1. #1
    Registered User
    Join Date
    Sep 2014
    Posts
    2

    int --> char, 2 ints in einem char array zusammenfügen, char array länge bestimmen

    Hello,
    I am working on a c-programm. In this program I have to convert the amount of money I read on two variables into the corret format.I got Euros and cents on 2 ints. But now I want to add both of those variables in a String(char array). Also i want to find out the length of the new char array.

    Need fast help
    Tausendsassa!
    Last edited by Tausendsassa; 09-25-2014 at 03:30 AM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    This is an English speaking forum.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Sep 2014
    Posts
    364
    Quote Originally Posted by Salem View Post
    This is an English speaking forum.
    His Topic in english are:
    'int --> char, join 2 ints in one char array, intend length of char array'

    @Tausendsassa
    Look at sprintf-function.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 11-17-2008, 12:36 PM
  2. Dealing with ints that are in char array
    By Wiretron in forum C Programming
    Replies: 4
    Last Post: 05-15-2006, 04:06 PM
  3. need help with char and ints in an array
    By satory in forum C Programming
    Replies: 1
    Last Post: 12-05-2004, 01:41 PM
  4. Problem Putting INTs Into a CHAR Array
    By cram in forum C++ Programming
    Replies: 13
    Last Post: 10-13-2004, 07:53 AM
  5. Read File To Char Array with Null char init
    By MicroFiend in forum Windows Programming
    Replies: 1
    Last Post: 10-28-2003, 06:18 PM