Thread: English version int-->char,2 ints add to a char array, find the length of char array

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

    English version int-->char,2 ints add to a char array, find the length of char array

    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!

  2. #2
    Tweaking master Aslaville's Avatar
    Join Date
    Sep 2012
    Location
    Rogueport
    Posts
    528
    Quote Originally Posted by Tausendsassa View Post
    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!
    Talk is cheap, show us the code; we can then help you

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    I guess you could start by looking at the manual page for sprintf()
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 09-25-2014, 06:12 AM
  2. Replies: 3
    Last Post: 11-17-2008, 12:36 PM
  3. Dealing with ints that are in char array
    By Wiretron in forum C Programming
    Replies: 4
    Last Post: 05-15-2006, 04:06 PM
  4. 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
  5. Problem Putting INTs Into a CHAR Array
    By cram in forum C++ Programming
    Replies: 13
    Last Post: 10-13-2004, 07:53 AM