The title comes from the famous site C++ FAQ by Marshall Cline.
The author claims that there is a difference between the following two code examples.
Suppose that List is the name of some class. Then function f() declares a local List object called x:
void f()
{
List x; // Local object named x (of class List)
...
}
But function g() declares a function called x() that returns a List:
void g()
{
List x(); // Function named x (that returns a List)
...
}
But is it really wrong to use the second variant?
And if it really is a declaration wouldn't the compiler complain that you cannot declare a function within a function?