3 ms·
Yes. A copy into type `Student` will copy each field, whereas `*Student` only takes the address. (Which would not be a problem if the loop didn't reuse the memo
by majewsky 9y ago
Yes. A copy into type `Student` will copy each field, whereas `*Student` only takes the address. (Which would not be a problem if the loop didn't reuse the memory slot for the loop variable.)
Also, indent with two spaces to get code formatting. HN formatting is (sadly) not Markdown.