Structure Pointer malloc()

#include<iostream>
#include<cstdlib>
using namespace std;
struct anik
{
    int age;
    string id;
};
int main()
{
    struct anik *p;
    p = (struct anik*) malloc(sizeof(struct anik));
    p->age = 20;
    p->id = "18101071";

    cout << "Age : " << p->age << endl;
    cout << "ID : " << p->id << endl;

    return 0;
}

Comments