How to implement a pointer array in setters y getters C++ | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to implement a pointer array in setters y getters C++

I'm having problems set the getters and setters in a pointer array, dunno how to do it, how can I solve this problem, here is the code: https://code.sololearn.com/cRu2NOt7Phdu/?ref=app Any idea about how to fix the problem? 🤔

18th Mar 2019, 6:39 AM
Eduardo Perez Regin
Eduardo Perez Regin - avatar
1 Answer
+ 5
https://code.sololearn.com/c2Fxb6IR8T3w/?ref=app Note: Using pointers with c style arrays you need to have someway to track array size. In the example object that you have you could create another data member to store this information easily enough :)
18th Mar 2019, 7:20 AM
jay
jay - avatar