Instantiate C++ Object with Empty Constructor
24 Jan 2021 Languages C/C++A pitfall of using C++ class empty constructor to instantiate an object. It is easy to make the mistake and not easy to realize without knowing the reason behind.
This is because compilers have no way to tell whether k2
without argument list is an object instantiation or function declaration.