Lesson 69.2 I got stuck | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

Lesson 69.2 I got stuck

Where to insert the access specifier? Which syntax.

5th Dec 2021, 8:39 PM
Vladimir Kushner
Vladimir Kushner - avatar
1 Respuesta
+ 16
Use protected access specifier for price and weight: class Product { protected: double price; int weight; ... } And extend the Product class: class Fruit : public Product
6th Dec 2021, 10:14 AM
Igor Makarsky
Igor Makarsky - avatar