I'm new to C and I'm stuck with a problem.
I'm building a linked list that gets a full string and divides it into 4 parts after the '_#_' characters.
Ex: trade_#_2009_#_invest_#_PROFIT
It separates to: trade 2009 invest PROFIT
So i managed to use strtok() and atoi to get the char 2009 into an int.
So basically what I'm searching to do is to Create a linked list that stores all the parsed words of every list in one single structure.
Your insert_beginning does access two global variables:
1 2
struct node * head;
struct node * tail;
You apparently want to replace those variables with one (preferably not global) variable of type struct double_linked_list, e.g. replace head=var with foo.head=var.