Inserting elements - overview
- Politechnika Śląska
- Fundamentals of Computer Programming
inserting elements void insert(double a, struct stag **h) { struct stag *p; p = (struct stag*)malloc(sizeof(struct stag)); if (!p) exit(1); p-x = a; p-next = *h; *h = p; } head = NULL; insert(45.6, &head); insert(54.3, &head); insert(1234, &head); ...