Closed cspartho closed 5 years ago
I'm still getting the same error what should i do ?
You need to specify whether your arrays parameters are memory or storage. Change the signature of addCandidate (string _name) to addCandidate (string memory _name).
It worked for me
function addCandidate (string _name) private { candidatesCount ++; candidates[candidatesCount] = Candidate(candidatesCount, _name, 0); } there is an error on string _name.the compiler says data location must be storage or memory.how to fix it?