I am in a course on udemy and I copied the code on the screen and am getting an error for my location string.
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.1;
contract PropertyV2 {
uint public value;
string public location;
//address public owner;
constructor(uint _value, string _location) public {
value = _value;
location = _location;
}
function setValue(uint _value) public {
value = _value;
}
function getLocation() public view returns(string) {
return location;
}}
I know this doesn't haven't much context. He was just explaining the basics of the code and contract name, compiler version, constructor, etc. But when I typed in the code it was giving an error just wanted to know how to fix the error to give the location string memory. I thought I was assigning it memory or storage in the constructor?