What is the best practice for concatenting arrays in Solidity?
I have this (which compiles):
contract Concatenator {
address[] Accounts1;
function ConcatenateArrays(address[] Accounts2){
uint i = 0;
while (i++ < Accounts2.length) {
Accounts1.push(Accounts2[i]);
}
}
}
I have a feeling that there might be a better way of doing it, however. Hence this question.
Also, I noticed that, if I pass the 2 arrays to the function, I get a memory error. Why can't I pass the two arrays directly to the fucntion?