I am not sure I fully understand recursion. I understand that you need a base case that will terminate the code and that recursive call needs to get simpler. I am trying to write a recursive function that will determine whether an inputted number is prime or not. I keep getting a stack overflow error when I input a number. I beleive a stack overflow means that the base condition is never checked or something. If you can look at my code and give me advise on what I am doing wrong I would greatly appreciate it. At this point I am not conscerned with program efficiency so much. I am just starting out. Thanks again.

Code:bool checkprime(int nv) { int k =2; if(nv ==2 || k>nv/2) //Base Case ??? return true; if(nv%k ==0) return false; else{ k++; return checkprime(nv); //Recursive call } }