Thread: Convert string to ASCII values

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    46

    Convert string to ASCII values

    So I have a hashing function whereby I have to take a string as my key, get the sum of it's ASCII values and modulo by a given size.

    I realize this is relatively simple and can be accomplished through the use of sprintf but I cannot find any clear examples on how to do so.

    If anyone can give me an example it would be much appreciated as this is all I really need help on, and I can figure out the rest from there.


    Edit: to be clear, I only need help on figuring out the string to ascii conversion
    Last edited by jeanermand; 03-05-2012 at 06:13 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 12
    Last Post: 01-04-2011, 06:42 PM
  2. Convert ASCII to a string
    By Toonzaka22 in forum C Programming
    Replies: 2
    Last Post: 11-29-2009, 09:59 PM
  3. ASCII convert to Hexadecimal value?
    By ashish.malviya in forum C Programming
    Replies: 2
    Last Post: 04-05-2006, 12:45 AM
  4. How to Convert Space in ascii?
    By larkin10 in forum C++ Programming
    Replies: 4
    Last Post: 11-28-2005, 06:57 AM
  5. convert string to ASCII value
    By ling in forum C++ Programming
    Replies: 3
    Last Post: 06-11-2002, 08:24 AM

Tags for this Thread