+ 2

Help me with this cpp program .

so heres my program that takes any products flavour and their name as input and displays them ....using oop technique.....i want to modify that when i enter flavour as "sweet" ....its should not display flavour....please help me out. 🙌 https://code.sololearn.com/c54L4W35U10V/?ref=app

28th Sep 2018, 12:34 PM
adnan
adnan - avatar
1 Answer
+ 4
You should use a setter instead of a variable. If you get a variable and call it withing the same function. It will display the value. You need a setter method to a private variable. And not call it in the same block.
28th Sep 2018, 12:47 PM
Manual
Manual - avatar