I have a non important question about compilers for C++. The following code outputs
1
2
3
and I can't figure out why. What difference does declaring it with empty parameters make to no parenthesis at all?
#include <iostream>
using namespace std;
int main()
{
    int x;
    cout << x << endl;
    int y();
    cout << y << endl;
    int z(2);
    cout << z << endl;
    return 0;
}
The compiler is g++.
 
    