+ 2
About pointers in class
I want to create pointers for array of objects of the class? How is it? Ex:i have class. I create objects like obj[5]; I want to done this using pointer of new operator. Please explain me with examplr program?
2 ответов
+ 3
This will help you:
https://code.sololearn.com/csvZdD3Nlr93/?ref=app
+ 2
class* obj = new class[5];
Remember to delete obj with:
delete[] obj;