Typecasting void pointer to unsigned short
<p>Hi I'm trying to use the code from, <a href="http://blog.firetree.net/2006/08/23/nasa-srtm-elevation-data/" rel="nofollow">http://blog.firetree.net/2006/08/23/nasa-srtm-elevation-data/</a>, with no success, after much chasing around I found where it is failing, but have no idea how to fix it, please help, this has been doing my head in for about 6 hours.
This is the line that fails. data is a void pointer to a memory mapped file.</p>

<pre><code>unsigned short datum=((unsigned short*)data)[i];
</code></pre>

<p>I'm on OpenSuse using the gcc compiler. I'm on a 64bit system.
Thanks in advance.</p>
