I'm aware that, because C isn't object oriented, the closest we can get to methods is using function pointers in a struct. This is just a thought exercise, but is it possible to have:
list.add(void* data)
without passing in the list itself as a parameter?
I know that:
list.add(list_t* list, void* data)
would be easy to implement, but is there any way, using whatever parts of C, to simulate a method in this way?
I recognize it's possible the answer is no, but please explain to me if you can! Thanks.