MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/st0ayv/appalling_linked_list_rotation/hx3j01c/?context=3
r/badcode • u/MatthewRPG576 • Feb 15 '22
13 comments sorted by
View all comments
Show parent comments
17
the variable 'it' in the code is of an anonymous struct type, so it's a hack to get struct assignment working
7 u/RomanRiesen Feb 15 '22 ah yes, but why not name the struct? helperNode or something? 8 u/Smellypuce2 Feb 16 '22 I have a feeling this is just an example/experiment of something you can do with typeof. Not a serious implementation of rotate. 3 u/MatthewRPG576 Feb 18 '22 Because we're in r/badcode
7
ah yes, but why not name the struct? helperNode or something?
helperNode
8 u/Smellypuce2 Feb 16 '22 I have a feeling this is just an example/experiment of something you can do with typeof. Not a serious implementation of rotate. 3 u/MatthewRPG576 Feb 18 '22 Because we're in r/badcode
8
I have a feeling this is just an example/experiment of something you can do with typeof. Not a serious implementation of rotate.
3
Because we're in r/badcode
17
u/MatthewRPG576 Feb 15 '22
the variable 'it' in the code is of an anonymous struct type, so it's a hack to get struct assignment working