This is my code , it keeps giving me this error : declaration error undeclared identifier solidity , did u mean "value"? line ( return _value)

247 views Asked by At
pragma solidity 0.8.13;

contract student {
    string public value;

    constructor() public {
        value="sami";
    } 
    
    function set(string memory _value) public {
        value = _value;
    }
    
    function get() public view returns(string memory) {
        return _value;
    }
}
1

There are 1 answers

2
user3804427 On

You have undefined var in get() function "_value". MAy be you what return class var "value"?