Answer to Question #187450 in C++ for RAVI MISHRA

Question #187450

Explain dynamic constructor with example.


1
Expert's answer
2021-04-30T02:44:02-0400
#include <iostream>
using namespace std;
class Dynamic{
    public:
        Dynamic(){};
        void display(){
            cout<<"Object constructed successfully";
        }
};
int main(){
    Dynamic *object = new Dynamic(); //Dynamic constructor
    object->display();
    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS