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