Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 10
There is a space after test2 and test3 in lines 36,37,40,41 in your code. Animal test2; test2.identity="lion"; // remove space after test2. The dot(.) should be immediately after test2. Same in the other three lines test2.name(); Animal test3; test3.sound="roar"; test3.callsound(); After removing the spaces, the program works.
19th Dec 2018, 7:28 AM
Nova
Nova - avatar