#include <iostream>
#include <cstring>
using namespace std; 
class dynam
{
    public:
    int l; 
    char *name; 
    dynam (char *s)
    {
        l=strlen(s);
        name =new char [l+1];
        strcpy (name, s);
    }
    void display ()
    {
        cout <<name<<endl; 
    }
};
int main() {
    dynam c("hi");
    c. display ();
    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: