address[] emp = [address1,address2];
amount = total/emp.length;
for(uint256 i=0;i<employees.length;i++)
{
wallet = emp[i];
wallet.transfer(amount);
}
So This is the error I get.
TypeError: Type address is not implicitly convertible to expected address type payable
wallet = emp[i]; ^-----^
Help would be appreciated!
address[] emptoaddress payable[] emp, right? – user19510 Sep 27 '19 at 06:45address1andaddress2are actually written out and not variables of typeaddress. – Lauri Peltonen Sep 27 '19 at 07:43address payable[] empis certainly legal Solidity syntax and how you declare an array ofaddress payables. – user19510 Sep 27 '19 at 16:40address[] payable emp– vteja711 Sep 30 '19 at 04:31