0
//SPDX-License-Identifier:MIT
pragma solidity ^0.7.0;

import "./SimpleStorage.sol";

contract StroageFactory
{
    address[] public SimpleStorageArray;

    function createSimpleStorage() public
    {
        SimpleStorage _simpleStorage = new SimpleStorage();

The Compiler gives me error in the line below:Member "push" not found or not visible after argument-dependent lookup in address[] storage ref.

SimpleStorageArray.push(SimpleStorage(_simpleStorage));
    }
}
1
  • 1
    SimpleStorageArray.push(address(_simpleStorage));
    – Majd TL
    Jun 23 at 7:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.