The following code throws the exception perfectly fine in Visual Studio 2010:

```
        #include <iostream>
        #include <cmath>
        using namespace std;

        int perfectSquare(double sq, int nu);

        int main()
        {
            double num;
            double squareRoot;
            int perfectSq;

            cout << "Enter the a number: ";
            cin >> num;

            try
            {
                squareRoot = sqrt(num); 
                perfectSq = perfectSquare(squareRoot, num);
                cout << "The square root is: " << perfectSq << endl;
            }

            catch(char * exceptionString)
            {
                cout << exceptionString;
            }

            cout << "BYE." << endl;
        //  system("PAUSE");
            return 0;
        }

        int perfectSquare(double sq, int nu)
        {
            int temp = sq;
            if (sq != temp)     //clever test; if square root IS NOT an INT
            {
                throw "not a perfect square.\n";
            }
            else
            {
                return sq;
            }
        }

```

However, in Xcode, it will not resume and it keeps hitting a breakpoint in the debugger. For example if I inpute 33 (not a perfect square), the following error is displayed:
libc++abi.dylib: terminate called throwing an exception
(lldb) 

It should "throw" this line: "not a perfect square." and the program should terminate (like in VS 2010). I don't want to enable exception breakpoints in Xcode as I just want the program to run all the way to the end without debugging.

Thanks to all.