Default constructor with empty brackets

Is there any good reason that an empty set of round brackets (parentheses) isn’t valid for calling the default constructor in C++? MyObject object; // ok – default ctor MyObject object(blah); // ok MyObject object(); // error I seem to type “()” automatically everytime. Is there a good reason this isn’t allowed? 9 Answers 9

Call asynchronous method in constructor?

Summary: I would like to call an asynchronous method in a constructor. Is this possible? Details: I have a method called getwritings() that parses JSON data. Everything works fine if I just call getwritings() in an async method and put await to left of it. However , when I create a LongListView in my page … Read more