I see this code and I can't understand what it mean. I know how we use default constructor but this is not default constructor. What is this?
class X { ... }; int main() { X f(); }
It declares a function f which takes no parameters and returns a type X. This is also known as Most Vexing Parse in C++. It is a byproduct of the way the C++ standard defines the interpretation rules for declarations.
f
X
1.4m articles
1.4m replys
5 comments
56.9k users