Use command line arguments in your main function like this.

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

Then check of there is a parameter specified.