"ClassName" : No appropriate default constructor available
Scenario:
Parent: parentConstructor(int x, int y);
Child: childConstructor(int x, int y, int z);
Fix:
Parent: parentConstructor(int x, int y);
Child: childConstructor(int x, int y, int z) : parentConstructor(x, y);
Reason:
This will force the childConstructor to use specifically use parentConstructor(x, y), instead of looking for parentConstructor(x, y, z).
No comments:
Post a Comment