C++ Constructor / Class Question: Error - left of must have class/struct/union
<p>I realise what this error means, the thing that is puzzling me is why I get it. I have emulated the error in this tiny program for the sake of this question. Here is the code:</p>

<p>source file:</p>

<pre><code>#include "RandomGame.h"

using namespace std;

NumberGame::NumberGame(int i)
{
    upperBound = i;

    numberChosen = 1 + rand() % upperBound;
}

NumberGame::NumberGame()
{
    upperBound = 1000;

    numberChosen = 1 + rand() % upperBound;
}

int NumberGame::guessedNumber(int g)
{
    if (g == numberChosen)
    {
        return 2;
    }
    else if (g &lt; numberChosen)
    {
        return 0;
    }
    else
    {
        return 1;
    }
}
</code></pre>

<p>header file: </p>

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

class NumberGame
{
private:
    int upperBound;
    int numberChosen;
    int g;
public:
    NumberGame(int);

    NumberGame();

    int guessedNumber(int);
};

#endif
</code></pre>

<p>main:</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
#include "RandomGame.h"
using namespace std;

int makeEven(int);

int main()
{
    //only one of these lines will remain uncommented
    NumberGame newNumberGame(5); // works
    NumberGame newNumberGame;    // works
    NumberGame newNumberGame();  // doesn't work


     // I get the error here, apparently when using empty brackets, newNumberGame 
     //is not a class anymore. wwwhhyyyyy??????
    newNumberGame.guessedNumber(5);

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

<p>I haven't done C++ in a while so i'm sure it's something really simple, but why doesn't the empty brackets work? btw it also doesn't work if I just have one constructor with no arguments, or one constructor with a default argument. </p>
