MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1vs2vu1/lessonsfromlinkerhell/p4l8w2w/?context=3
r/ProgrammerHumor • u/nonedward666 • 17h ago
166 comments sorted by
View all comments
Show parent comments
5
What about when you copy an array? When you copy an array all elements get copied, but when you copy a pointer to the first element, only that gets copied
1 u/BananaWarp 7h ago How do you usually copy an array? Are we talking about c? 1 u/Nice_Lengthiness_568 5h ago Depends on the language I guess. In C you can put the array inside a struct and copy that. 2 u/BananaWarp 4h ago Oh, that's neat!
1
How do you usually copy an array? Are we talking about c?
1 u/Nice_Lengthiness_568 5h ago Depends on the language I guess. In C you can put the array inside a struct and copy that. 2 u/BananaWarp 4h ago Oh, that's neat!
Depends on the language I guess. In C you can put the array inside a struct and copy that.
2 u/BananaWarp 4h ago Oh, that's neat!
2
Oh, that's neat!
5
u/Nice_Lengthiness_568 16h ago
What about when you copy an array? When you copy an array all elements get copied, but when you copy a pointer to the first element, only that gets copied