Well, the types surely are incompatible.
The type of the next
field in number
is struct l *
, but the type of number
in info
is List
, which is an alias for struct l
, i.e. the entire struct, not just a pointer to it. So you're trying to assign a pointer into an entire structure, which won't fly.
It seems you're missing a pointer level, perhaps the number
field in info
should be List *
?