Results 1 to 3 of 3

Thread: Converting Ascii values to Characters

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Dec 2001
    Location
    Scotland
    Posts
    21
    Hi there, thanks for your reply, I got the program working I'm a little unclear as to what you mean by "casting", can u please explain a little futher ?

    Also what does "(char)a" do ? I think I got the idea but want to make sure I'm right.

    Thanks again

    CaptainChainsaw

  2. #2
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    Location
    In a bar frequented by colossal death robots
    Posts
    772
    Casting is basically converting one data type to another. You do it by typing (newtype)variable;. Example:
    Code:
    int theInt = 90;
    char theChar = (char)theInt; // theChar now holds the ASCII equivalent of theInt
    Alcohol & calculus don't mix.
    Never drink & derive.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Dec 2001
    Location
    Scotland
    Posts
    21
    Thank you Wynd, I got the idea now!

    CaptainChainsaw

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width