pragma solidity ^0.4.23;
contract tracking {
struct data {
uint ownernumber;
uint id;
}
uint value;
mapping (uint256 => data) public datamatching;
function storedata (uint _ownernumber, uint _id) public {
var persondata = datamatching[value];
persondata .ownernumber = _ownernumber;
persondata. id = _id;
}
function getData(uint256 userId) returns (uint){
}
}
1) I wrote a function to store the values in my solidity code
2) Now in getData function, I want the user to enter the ownernumber
and get all the details matching to the ownernumber
is it possible please help me
Common errors:
Use of the "var" keyword is disallowed. Data location must be
"storage" or "memory" for variable, but none was given