I am using code similar to this:
Expand|Select|Wrap|Line Numbers
- #include <stdlib.h>
- #include <stdio.h>
- int main(void)
- {
- char string[] = "0D76";
- long value = strtol(string, NULL, 16);
- printf("value of '%s' is %ld\n", string, value);
- return 0;
- }
Thus I'm on VS6.0
strtol requires a
char string[] as its first argument.
all of my data is being passed in, in a huge array of records declared
std::string hexdata[250000];
How do I get around this? This VS6 environment doesn't really have streams to implement.
Also, when I look in the VS include directory all the standary headers are there including stdlib.h
The compiler an error that strtol is not a member of std.
I have opened stdlib.h and I find strtol listed in there.
Any clues on how to get it to see strtol in stdlib.h or is there another workaround giving my above constraints.
Thanks