   Hash code
  How do you find the hash code for a data type of three longs?F.E:struct NODE{   long data1;   long data2;   long data3;   }long gethashcode(NODE & n)
  The simplest way would be to just cast the structure into a byte array and pass it to a hashing function:hash = calcHash((char*)&myNode, sizeof(myNode));Obviously they key thing here is the implementation of the hashing algorithm. Just do a google search for "hash algorithm" and you should get some hits. Most hashing algorithms typically return a hash larger than 32-bits. If you can't find one natively generating a 32-bit hash just take the first 32-bits from any larger hash generated by a good hashing algorithm (it is worth checking to see if a hashing algorithm's authors advise doing this - some poor hash functions are not suitable for this).With your particular situation a perfect hashing algorithm will give you three possible nodes for each hash (3 longs -> 1 long) but as your hash size is not much smaller than that of your data you may actually benifit from not using a hash if you do not have millions of nodes on the go at once - You'd save the time of calculating the hash at the cost of storage. If you were planning to use the hash for sorting you could just use an alternate comparison function e.g.:   // Returns true if node a > node b   bool node_greaterThan(const NODE &a, const NODE &b) { if (a.data1 > b.data1) return true; else if (a.data1 < b.data1) return false; if (a.data2 > b.data2) return true; else if (a.data2 < b.data2) return false; if (a.data3 > b.data3) return true; else if (a.data3 < b.data3) return false; return false;   }Obviously this is not as quick as a simple hash comparison but may be useful depending on your situation.Hope this all helps,Mike.