I am not sure how to do this
I have a string and I need to convert it to a long.
Code:dim x as long
dim str as string
str = "546"
x = str
I get an error doing this but I need to convert the str to a long somehow
Printable View
I am not sure how to do this
I have a string and I need to convert it to a long.
Code:dim x as long
dim str as string
str = "546"
x = str
I get an error doing this but I need to convert the str to a long somehow
That's because you are writing VB code in a C/C++ program.Quote:
I get an error doing this but I need to convert the str to a long somehow
strtol sounds like it will do what you want...
ahh DOH
Sorry I posted this in the wrong forum. Sorry...