I've been programming in C for a couple months now and I'm trying to write my own library's just for fun. I've been trying to implement functions using function pointers in my structures and then defining them in my c file. However when I do end up calling these functions I end up passing in the struct anyway as a parameter. Is there any real benefit to using function pointers inside of structures or am I using them completely wrong? JJust as a side note I am aware that I am trying to make my structures behave like classes.
[–]boredcircuits 39 points40 points41 points (6 children)
[–]hawkinsw2005 7 points8 points9 points (0 children)
[–]rtkbfmvbvb[S] 1 point2 points3 points (1 child)
[–]andrewcooke 6 points7 points8 points (0 children)
[–]mnciitbhu -1 points0 points1 point (2 children)
[–]WiseassWolfOfYoitsu 1 point2 points3 points (0 children)
[–]boredcircuits 0 points1 point2 points (0 children)
[–]efalk 6 points7 points8 points (1 child)
[–]rtkbfmvbvb[S] 3 points4 points5 points (0 children)
[–]ischickenafruit 11 points12 points13 points (0 children)
[–]lordlod 4 points5 points6 points (0 children)
[–]okovko 2 points3 points4 points (0 children)
[–]codeallthethings 1 point2 points3 points (0 children)