eg FFFF = 65535
what I need to do is get the number (decimal) back from the String (hex)
the items are stored in character arrays sA[4] and sB[9]
I need to run a formula on the two values but first I need to get their
numeric representation out. is there any built in function that can do this?
in vb it's simple:
key = "FDE4"
dim hexString as integer = cInt("&H" & key)
essentially casting, is there an equivalent method in vc7.
I need to stay away from the CLR since this is a setup dll and there may be
no Framework on the machine.
Thanks Bunches! -Shadow
#include <sstream>
int readFromHex(const char* sz)
{
int i;
std::istringstream iss( sz );
iss >> i;
if( !iss ) {
throw error(sz);
}
return i;
}
> [...]
> Thanks Bunches! -Shadow
Schobi
--
Spam...@gmx.de is never read
I'm Schobi at suespammers dot org
"Sometimes compilers are so much more reasonable than people."
Scott Meyers