0

I'm follow this tutorial to learn about smart contract on Ethereum.This is the pieces of code I already made.

pragma solidity ^0.4.24;

// Naming the contract
 contract MyContract {
   string value;

   constructor() public{
     value = 'myValue';
   }

   function get() public view returns(string){
    return value;
   }

   function set(string _value) public {
    value = _value;
  }
 }

But when I try to run it... Console throw an error --> 'unexpected token: identifier'

  • 1
    Try string private value;. Also, verify that Remix is configured to use solc 0.4.24 or 0.4.25 or 0.4.26. – goodvibration Jun 8 at 14:56

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.