
Donald W. answered 04/01/22
Senior Software Engineer with over 25 years of industry experience
You don't need the pair of parenthesis when creating an instance of StoreClass on the stack if using the default constructor. So that first line in main() after the comments should just be:
StoreClass store1;
You only need the parenthesis when creating it on the heap, such as:
StoreClass *store1 = new StoreClass();