Review the command line tokens that are passed to main when you define it thusly:

int main (int argc, char *argv[])

We will be happy to help you with your code, but it is unlikely that anyone will write it for you.