Calculate With Inheritance | Sololearn: Learn to code for FREE!


Calculate With Inheritance

I saved all my pages of code to code playground under Calculate with Inheritance. I can't seem to get it to compile. I am trying to have circle and square be derived classes of Shape. and the constructor circle():Shape(){ is flagging an error. Can someone help me out and tell me what I did wrong?

12/11/2017 11:17:24 PM

Elyse Segebart

6 Answers

New Answer


I've made it compile. Had to comment out headers files. Other changes should be needed where you are compiling.


Link the code with the question so people can help you. Just in case you don't know how, follow these instructions: Open your code in Code Playground Tap on the share button above Select an option that suggests to copy to clipboard Go back to this question Select Edit from the menu to the right At the bottom of question description insert an empty line Long press and select Paste


@Elyse, For C/C++ Sololearn does not offer a seperate header(.h) and source (.c, .cpp) compilation model, so all your declarations and definitions needs to be in the same file.


@John Wells Thank you!!! I appreciate it very much.


Thank you ! I linked the code into the question.


go to a very famous freelancer website, book me and ill do it for you...