Top "Strtol" questions

atol() v/s. strtol()

What is the difference between atol() & strtol()? According to their man pages, they seem to have the same effect …

c strtol
Basics of strtol?

I am really confused. I have to be missing something rather simple but nothing I am reading about strtol() is …

c++ string int strtol
Getting a hexadecimal number into a program via the command line

I can do this: int main(int argc, char** argv) { unsigned char cTest = 0xff; return 0; } But what's the right way …

c base-conversion strtol
C - Comparing numeric strings

Out of professional curiosity, what is the safest / fastest / most efficient way to compare two fully numeric strings in C? #…

c strcmp atoi strtol
Is there a C function to get permissions of a file?

I am writing a c program to be run on UNIX, and attempting to utilize the chmod command. After consulting …

c unix permissions strtol
std::atoll with VC++

I have been using std::atoll from cstdlib to convert a string to an int64_t with gcc. That function …

c++ int64 uint64 strtol
Convert hexadecimal string to long

I am trying to do an hexadecimal to integer conversion on a 32 bit machine. Here is the code I am …

c hex type-conversion integer-overflow strtol
Using strtol to validate integer input in ANSI C

I am new to programming and to C in general and am currently studying it at university. This is for …

c string ansi strtol
Do I need to cast the result of strtol to int?

The following code does not give a warning with g++ 4.1.1 and -Wall. int octalStrToInt(const std::string& s) { return …

c++ casting strtol
C: using strtol endptr is never NULL, cannot check if value is integer only?

So here is the problem. I have a set of data that is supposed to be : int int int int .... …

c++ c strtok strtol