hi everybody
in a program i have the following code
typedef struct game {
linked_list *list; //datastruktur som jag definierat själv
} game;
in the main program i have following
game *g1 =malloc(...)
linked_list *link=malloc(...)
if i want to change the content of *g1 from a function i have to do it from a function like this
void addInList (game **g, linked_list ** li) {
*g->list=*li;
}
and when i call the function i do it with following code
addInList(&g, &link)
can somebody tell me why this piece of code doesn't work and how should the corect syntax be