My function:
function add_voter(address add_of_voter, string name_of_voter)public {
require (msg.sender == admin, "Action prohibited! Adding voter can only be done by Admin");
voters[voter].voter_add = add_of_voter;
voters[voter].voter_name = name_of_voter;
}
When I run the code, I get this error:
TypeError: Data location must be "memory" for parameter in function, but none was given.
How to solve it?