1
pragma solidity 0.5.0+;
contract Survey {
    /* Events */
     event SurveyInitialized(address indexed owner, uint indexed surveyReward);

    /* Contract State */
    address public owner;
    address private factory;

    Constructor Survey(address _owner) payable public {
        (_owner != address(0));
        (msg.value > 0);
        owner = _owner;
        factory = msg.sender;
        emit SurveyInitialized(owner, msg.value);
    }
}

the error :

browser/checkbalance.sol:12:20: ParserError: Expected ';' but got '(' Constructor Survey (address _owner) payable public

3

You don't need to put any name after constructor. Just write it as :

constructor (address _owner) payable public

Also change your pragma to:

pragma solidity ^0.5.0;

for better results.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.