Well better names would be a help, rather than short identifiers differing only by a single letter.
Code:
typedef struct node {
item *item;
node *next;
} node;
typedef struct item {
int i;
} item;
Then
Code:
node *makeNewNode ( int i ) {
node *newNode = malloc(sizeof(*newNode));
newNode->item = malloc(sizeof(*newNode->item));
newNode->item->i = i;
newNode->next = NULL;
return newNode;
}
> what am i doing wrong?
Hard to say, you didn't really post enough code to say for sure.
Random 1-line snippets of your thoughts doesn't really work.