C++ error: expected unqualified-id @ first bracket "{" : <pre><code>#include &lt;iostream&gt;
using namespace std;

int main();

{    union numbericUnion
{
    int intValue;
    long longValue;
    double doubleValue;
};

numbericUnion myUnion;
myUnion.intValue = 3;
cout &lt;&lt; myUnion.intValue &lt;&lt; endl;
myUnion.doubleValue = 4.5;
cout &lt;&lt; myUnion.doubleValue &lt;&lt; endl;
cout &lt;&lt; myUnion.intValue; cout &lt;&lt; endl;
}
</code></pre>

<p>At the first bracket "{", the code is stating "expected unqualified-id". Can you please help? I am a true beginner, learning on my own. </p>
