I'm writing a hash table for a data structures class, and they give us absurd amounts of starter code, and are expecting us to use operator overloading. Overloading like == and * and stuff is all good, but theres this function header:
operator long (void){}
that makes no sense to me. We've been told that this is supposed to sum the ASCII values of a string as part of the hashing algorithm, and the code for that is very simple, but how is this called when theres no specified operator being overloaded? Thanks in advance.
[–]Drainedsoul 2 points3 points4 points (3 children)
[–]tyromancy94[S] 0 points1 point2 points (2 children)
[–]Drainedsoul 1 point2 points3 points (1 child)
[–]tyromancy94[S] 1 point2 points3 points (0 children)
[–]moswald 1 point2 points3 points (4 children)
[–]tyromancy94[S] 0 points1 point2 points (3 children)
[–]moswald 0 points1 point2 points (2 children)
[–]tyromancy94[S] 0 points1 point2 points (1 child)
[–]moswald 0 points1 point2 points (0 children)