char to int

This is a discussion on char to int within the C Programming forums, part of the General Programming Boards category; Hi, How can I convert a char to int? e.g. I read 1 as a char and one to pass ...

  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
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,750

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 48
    Last Post: 09-26-2008, 04: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, 09:36 PM
  3. Replies: 14
    Last Post: 06-28-2006, 02: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, 02:27 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21