This program takes a parameter, which is how many prime numbers you need. However if you want to make a program which checks whether a number is prime or not you can delete everything in the main function and put this line instead:
cout << isPrime (argv ) ? "It's a prime." : "It's not a prime."
Hope you find this useful, if it works correct ;).