digitalmars.D - how does one address the char[] hash() method?
- Kris (4/4) Jul 04 2004 I thought this the appropriate incantation, but it produces an Access
- Walter (3/7) Jul 05 2004 Put an & in front of myCharArray.
- Kris (6/17) Jul 05 2004 Thank you Walter;
- Stewart Gordon (9/13) Jul 06 2004 And I would've thought this the appropriate incantation:
I thought this the appropriate incantation, but it produces an Access Violation: uint hash = typeid(char[]).getHash (myCharArray); - Kris
Jul 04 2004
Put an & in front of myCharArray. "Kris" <someidiot earthlink.dot.dot.dot.net> wrote in message news:ccaj0b$7eh$1 digitaldaemon.com...I thought this the appropriate incantation, but it produces an Access Violation: uint hash = typeid(char[]).getHash (myCharArray); - Kris
Jul 05 2004
Thank you Walter; It's non-intuitive, and contrary to typical array=>void * conversion mechanics. But it does work, and that's good enough for me right now <g> - Kris "Walter" <newshound digitalmars.com> wrote in message news:ccc0pk$2ku9$1 digitaldaemon.com...Put an & in front of myCharArray. "Kris" <someidiot earthlink.dot.dot.dot.net> wrote in message news:ccaj0b$7eh$1 digitaldaemon.com...I thought this the appropriate incantation, but it produces an Access Violation: uint hash = typeid(char[]).getHash (myCharArray); - Kris
Jul 05 2004
Kris wrote:I thought this the appropriate incantation, but it produces an Access Violation: uint hash = typeid(char[]).getHash (myCharArray);And I would've thought this the appropriate incantation: uint hash = myCharArray.toHash; Objects have the toHash property, why not arrays and atomic types? Stewart. -- My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment. Please keep replies on the 'group where everyone may benefit.
Jul 06 2004