Thread: String manipulation.

  1. #16
    Registered User
    Join Date
    Jan 2005
    >> Isn't there a function for converting a single char to an int?
    No. There really isn't any need for it anyway, since writing it out is so simple and always works.

    >> Or couldn't i just cast the char to an int? Would that help?
    No, casting to an int would provide the character code for the digit, not the actual number itself. An implicit cast is what was done automatically in your original code that was causing the problem.
    Last edited by Daved; 06-15-2007 at 09:57 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C++ ini file reader problems
    By guitarist809 in forum C++ Programming
    Replies: 7
    Last Post: 09-04-2008, 06:02 AM
  2. Compile Error that i dont understand
    By bobthebullet990 in forum C++ Programming
    Replies: 5
    Last Post: 05-05-2006, 09:19 AM
  3. Replies: 4
    Last Post: 03-03-2006, 02:11 AM
  4. Linked List Help
    By CJ7Mudrover in forum C Programming
    Replies: 9
    Last Post: 03-10-2004, 10:33 PM
  5. string manipulation
    By SPEKTRUM in forum Linux Programming
    Replies: 3
    Last Post: 01-26-2002, 11:41 AM