This looks like code inherited from good old C where you have to state that the type you're using is a struct, unless it's explicitly typedef'd.
The struct list*
at the start is the type returned by the function list_cons
. In C++ you would simply write list* list_cons
. Either syntax here means the function returns a pointer to a list structure.
Same goes for the parameters in the function, the first parameter is simply an int, the second parameter is a pointer to a list structure. Considering that the variable is named tail, I would expect it should be the back of the list.
If you've not covered pointers in C++ then you'll have to go a take a good long look into that first before understanding this.
Otherwise the struct list*
in C is equivalent of list*
in C++.