why is stroull() not working on a byte array with hexadecimal values?
<p>here is some new test code with regards to my long issue. 
I  figure that if i code my stuff as long long then that is half the battle in porting.
the other half would be to make it into big endian so it can work on any 64 bit system.
so i did the following:</p>

<pre><code>#include &lt;iostream&gt;  
#include "byteswap.h"
#include "stdlib.h"

using namespace std;

int main()

{

char bytes[6] = {0x12,0x23,0xff,0xed,0x22,0x34};


//long *p_long = reinterpret_cast&lt;long*&gt; (bytes);


long long *p_long = reinterpret_cast&lt;long long*&gt; (bytes);


std::cout&lt;&lt;"hex="&lt;&lt;std::hex&lt;&lt;*p_long&lt;&lt;"LE"&lt;&lt;std::endl;


*p_long = bswap_64(*p_long);


std::cout&lt;&lt;"hex="&lt;&lt;std::hex&lt;&lt;*p_long&lt;&lt;"BE"&lt;&lt;std::endl;




return 0;

} 
</code></pre>

<p>this seems to me the simplest way of doing it. the problem now is at using bswap...i get the following output</p>

<p>hex=34563422edff2312LE
hex=0BE</p>

<p>i got all the bytes in the first as LE. but now it seems the 64bit swap function is not working. I think this would solve the issue i am having. </p>

<p>considering that i will be operating on a 20 byte array. i am also not sure how i would use pointers to do that. i am thinking i would need an array of long long pointers to get all this stuff stored and then call the byteswap on each to swap the values in each of those pointers. I personally have not done pointer incrementation via sizeof(long) to increment before.</p>
