Declaration syntax error is showing in this program. What should i write. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Declaration syntax error is showing in this program. What should i write.

https://code.sololearn.com/c6go35hTkoYr/?ref=app

1st Apr 2020, 9:27 AM
Disha Dey
Disha Dey - avatar
4 Answers
+ 6
1. There should be a space inbetween the class keyword and the actual name of the class. 2. Class definitions should end with a semicolon. 3. If you want to construct an object of class 'C' in main(), you should either call the constructor explicitly to create a temporary instance, i.e. C(), or create an actual object, e.g. C c.
1st Apr 2020, 9:32 AM
Shadow
Shadow - avatar
+ 2
There should be space between class A, class B, class C and also at the end of class definition there should be semicolon (;) https://code.sololearn.com/ceks5YsBoo12/?ref=app
1st Apr 2020, 9:33 AM
A͢J
A͢J - avatar
+ 2
Disha Dey The code you linked is currently still the same. We can't help you without seeing the changes you made. Also, AJ #Level 20 End Day already linked a fully working example that you can use for orientation.
1st Apr 2020, 10:05 AM
Shadow
Shadow - avatar
0
Now it's showing more error.
1st Apr 2020, 9:45 AM
Disha Dey
Disha Dey - avatar