C++ classes | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

C++ classes

Explain why a class might provide a set function and a get function for a data member.

15th Sep 2018, 3:52 AM
kumar Quiroz
kumar Quiroz - avatar
2 Respuestas
0
one example is having a class for customers. you might have data like name, address, phone number, etc. later on you might need to get the data, or you might need to set the data to something else, like adding info about a purchase. does that answer?
15th Sep 2018, 4:12 AM
H U
H U - avatar
- 1
it does thank you :)
15th Sep 2018, 4:14 AM
kumar Quiroz
kumar Quiroz - avatar