On 2007-08-04 11:47, Jim Langston wrote:
> "hamishd" <Hamish.Dean@gmail.com> wrote in message
> news:1186219573.640775.272620@x35g2000prf.googlegroups.com...
>> Is this possible? Sorry if this question isn't relevant here.
>>
>> actually, I'm really trying to convert a unsigned char * to an int
>
> Are you trying to convert the value of the pointer, or where the pointer is
> pointing to?
>
> Either way, reinterpret_cast is what you want.
> reinterpret_cast<int>( Foo );
reinterpret_cast should not be needed it it's a unsigned char -> int
conversion the OP is trying to do, both are integer types so a normal
assignment should do, right?
--
Erik Wikström