Ethereum Solidity: Memory vs Storage & How to initialize an array inside a struct
Georgios Konstantopoulos
1.3K3
The following should also work:
Room memory room;
rooms.push(room);
rooms[rooms.length-1].players.push(msg.sender);
It would be best to just have a function rooms.push()
, perhaps we should add that.