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

+1

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? https://code.sololearn.com/c7eE3d5zKhVH

12/11/2017 11:17:24 PM

Elyse Segebart

6 Answers

New Answer

+1

I've made it compile. Had to comment out headers files. Other changes should be needed where you are compiling. https://code.sololearn.com/cf24SL8sjAOk/?ref=app

+5

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

+2

@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.

+1

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

0

Thank you ! I linked the code into the question.

0

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