Results 1 to 4 of 4

Thread: Chr/Asc...?

  1. #1

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    is there a C++ equivalent to the VB Chr()/Asc() functions?
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    It's not needed.

    Code:
    char c = 'a';
    is just the same as
    Code:
    char c = 97;
    As far as the computer is concerned, characters don't exist, it's all just numbers. You can enclose a character in single quotes ( ' ) to get the code for that character. A character is just an 8-bit integer, though.
    Harry.

    "From one thing, know ten thousand things."

  3. #3

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    cool, thanks Harry You saved my life! Well, not really, since I'm just practicing, but your help is much appreciated anyway...
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  4. #4
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    No problem
    Harry.

    "From one thing, know ten thousand things."

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