Skip to main content
added 14 characters in body
Source Link
Mahesh Rajput
  • 1.2k
  • 8
  • 17

You need to give memory keyword to your code function string parameter like this:

function setName(string memory newName) public{

and also for return string parameter

function getName()public view returns(string memory){

You need to give memory keyword to your string parameter like this:

function setName(string memory newName) public{

and also for return string parameter

function getName()public view returns(string memory){

You need to give memory keyword to your code function string parameter like this:

function setName(string memory newName) public{

and also for return string parameter

function getName()public view returns(string memory){

Source Link
Mahesh Rajput
  • 1.2k
  • 8
  • 17

You need to give memory keyword to your string parameter like this:

function setName(string memory newName) public{

and also for return string parameter

function getName()public view returns(string memory){