Comment

Integers as Parameters

Often, string parameters are what you want. The parameters might be file names, for example. But what if you want integer parameters? The function atoi() is useful for that.

int atoi(const char *str)

This function inputs (a pointer to) a null-terminated string and returns an int.

If the parameter cannot be converted the function returns 0.

Use #include <stdlib.h>



Next Page         Previous Page Home