on-internet
← Community

What is the &endptr we use on strtol()? [duplicate]

Stack Overflow ·

I know we're supposed to use strtol like this strtol(str, &endptr, base), but it doesn't seem to make sense. If it asked for the last character of the stror maybe the position of the \0 in the str, then it would make more sense to me, but I just don't get it. Can anyone clarify?

Comments

Sign in or sign up to comment and upvote.

No comments yet.