title: conflicting return values of generic find function in class (C++), what to return?
body: <p>I have a method in my class which called "find()" that returns a pointer to the data stored in the class (the class is hash table to be precise). I find this a bad idea to return a pointer to my class' data, and i haven't found anything better. any suggestions about how to find the data without being afraid that the user may delete (modify) my object ? 
  this is the find method:
  (the class is hash-table, it works completely find)</p>
  
  <pre><code>Data* find(const Key&amp; key) {
      if (isMember(key) == false) {
          return NULL;
      }
      int hash_idx = hash_function(key, table_size);
      return &amp;(*((table[hash_idx])-&gt;find(key)));
  }
  </code></pre>