The first one could be mitigated by providing an array of article pointers ([]*Article). That way, article.legs = 99 would work.
Else, the way mentioned in the article, or (&article).legs = 99 (ugly) would work. Take your pick.
Else, the way mentioned in the article, or (&article).legs = 99 (ugly) would work. Take your pick.
(&article).legs = 99
This would not work actually because it would only be modifying the copy that exists in the inner loop of the for loop. You'd be taking a pointer to the for loop stack variable and modifying it.If they were already references as you first mention that way simply article.legs = 99 would work yes.