Your main function has the wrong signature. It should receive 2 parameters: argc and argv. The first is the number of arguments passed in from the operating system (including the 1st one, which is the location of the executable) and the 2nd is the array of arguments as strings (const char *).
See the below example:
#include <stdio.h>
int main(int argc, const char * argv[])
{
printf("I've received %d number of arguments.\n", argc);
for (int i = 0; i < argc; i++)
{
printf("\t%i. argument: %s\n", i, argv[i]);
}
return 0;
}If you want to convert a string to a numeric type, you can use various functions, such as atoi().