Here is my code. I am using Dev-C++ 4.9.8.0 and I can not figure out why this wont compile.
#include <iostream>
#include <cmath>
#include <stdlib.h>
using namespace std;
int main() {
    int  n;    // Number to test for prime-ness
    int  i;    // Loop counter
    int  is_prime = true; // Boolean flag...
                          // Assume true for now.
    // Get a number form the keyboard.
    cout << "Enter a number and press ENTER: ";
    cin >> n;
    // Test for prime by checking for divisibility 
    // by all whole numbers from 2 to sqrt(n).
    i = 2;
    while (i <= sqrt(n)) {  // While i is <= sqrt(n),
         if (n % i == 0)         // If i divides n, 
             is_prime = false;   //    n is not prime.
         i++;
 }
 // Print results
 if (is_prime)
     cout << "Number is prime." << endl;
 else
     cout << "Number is not prime." << endl;
 system("PAUSE");   
 return 0;
}
Im getting various error messages about overloading. Can someone please help me figure out why its not compiling correctly.
 
     
     
    