Thread overview | ||||||
---|---|---|---|---|---|---|
|
July 05, 2004 how does one address the char[] hash() method? | ||||
---|---|---|---|---|
| ||||
I thought this the appropriate incantation, but it produces an Access Violation: uint hash = typeid(char[]).getHash (myCharArray); - Kris |
July 05, 2004 Re: how does one address the char[] hash() method? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kris | 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 > > |
July 05, 2004 Re: how does one address the char[] hash() method? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter | 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 > > > > > > |
July 06, 2004 Re: how does one address the char[] hash() method? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Kris | 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. |
Copyright © 1999-2021 by the D Language Foundation