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

18th Feb 2021, 4:47 PM
Jawahirullah
Jawahirullah - avatar
2 Respostas
18th Feb 2021, 5:38 PM
JaScript
JaScript - avatar
+ 2
class* obj = new class[5]; Remember to delete obj with: delete[] obj;
18th Feb 2021, 5:09 PM
你知道規則,我也是
你知道規則,我也是 - avatar