error expected ';' before instance
<p>Quick overview of how I got to this.</p>

<ol>
<li>Created the structure</li>
<li>Created the <strong>.cpp</strong> file</li>
<li>Used <em>CMake</em> to create <em>Make</em> file</li>
<li>Ran <em>Make</em> and received error</li>
</ol>

<p>I'm trying to compile the following code:</p>

<pre><code>#include &lt;iostream&gt;
using namespace std;

enum UnitType { Meter, Inch };
class Meter {
    double value;

    public:
        Meter(double value) : value(value) {}
        double convertTo(UnitType unit) {
            if (unit == Inch) {
                return value * 39.3700787;
            }   
        };  
};

int main (int argc, char *argv[])
{
    try 
    {   
        Meter meter(1.0);
    }
    catch (int e) {
        cout &lt;&lt; "exception " &lt;&lt; e &lt;&lt; endl;
    }

    return 0;
}
</code></pre>

<p>but, I'm receiving the following error:</p>

<pre>
$ make
[100%] Building CXX object CMakeFiles/convert-length.dir/convert-length.cpp.o
/convert/length/convert-length.cpp: In function ‘int main(int, char**)’:                                    
/convert/length/convert-length.cpp:27: error: expected ‘;’ before ‘meter’
make[2]: *** [CMakeFiles/convert-length.dir/convert-length.cpp.o] Error 1
make[1]: *** [CMakeFiles/convert-length.dir/all] Error 2
make: *** [all] Error 2
</pre>

<p>I'm hoping this is a silly C++ syntax error somewhere that I'm missing, but I've spent a couple hours looking for it with no success. I have little C++ experience, but this code looks syntactically correct. Does anyone see or know what is wrong?</p>
