 <p>The statement <code>Foo f();</code> is a function declaration, not a declaration of a local variable <code>f</code> of type <code>Foo</code>. To declare a local <code>Foo</code> value using the parameterless constructor you must omit the <code>()</code> </p> <pre><code>Foo f; f.doSomething(); </code></pre>