Thread: char to int

  1. #1
    Registered User
    Join Date
    Dec 2005
    Posts
    141

    char to int

    Hi,

    How can I convert a char to int?
    e.g. I read 1 as a char and one to pass it to a function which takes int.

    Thanks,
    Angkar

  2. #2
    Registered User
    Join Date
    Dec 2005
    Posts
    141
    btw casting using (int) is not working!

  3. #3
    Lurking whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    9,612

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 48
    Last Post: 09-26-2008, 03:45 AM
  2. can some one please tell me the cause of the error ?
    By broli86 in forum C Programming
    Replies: 8
    Last Post: 06-26-2008, 08:36 PM
  3. Replies: 14
    Last Post: 06-28-2006, 01:58 AM
  4. Game Won't Compile
    By jothesmo in forum C++ Programming
    Replies: 2
    Last Post: 04-01-2006, 04:24 PM
  5. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM