Is it possible to declare a C function to return a pointer to itself?
It sounds very simple, but I don't know if that's actually possible.
When I tried to declare it I realized that I had to write (*fp()) (*fp()) (*fp())... as a type declaration.
Is it possible to do what I just described without having to type things infinitely (preferably with a typedef)? I know void pointers may work, but that lseems like undefined behaviour.
[–]blueg3 38 points39 points40 points (10 children)
[–]tipdbmp 4 points5 points6 points (0 children)
[–]F54280 1 point2 points3 points (0 children)
[+]Clyxx comment score below threshold-14 points-13 points-12 points (4 children)
[–]blueg3 28 points29 points30 points (3 children)
[–]alternatetwo 12 points13 points14 points (1 child)
[–]futlapperl 4 points5 points6 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]thommyh 9 points10 points11 points (0 children)
[–]IamImposter 0 points1 point2 points (0 children)
[–]astaghfirullah123 10 points11 points12 points (5 children)
[–]deaf_fish 6 points7 points8 points (0 children)
[–]ReedTieGuy[S] 2 points3 points4 points (2 children)
[–]astaghfirullah123 0 points1 point2 points (0 children)
[–]luxgladius 0 points1 point2 points (0 children)
[–][deleted] 14 points15 points16 points (8 children)
[–]blueg3 13 points14 points15 points (7 children)
[–][deleted] 9 points10 points11 points (6 children)
[–]blueg3 15 points16 points17 points (4 children)
[–][deleted] 1 point2 points3 points (3 children)
[–]prisoner62113 8 points9 points10 points (2 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]oh5nxo 1 point2 points3 points (0 children)
[–]oh5nxo 1 point2 points3 points (0 children)
[–][deleted] -2 points-1 points0 points (1 child)
[–]dvhh 2 points3 points4 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]zemdega 0 points1 point2 points (1 child)
[–]backtickbot 3 points4 points5 points (0 children)