Is it possible to generate a non-local variable with a function?
Weird question but it's for an exercise my senior asked me to do, I've scoured the web for an answer to no avail.
Instead of declaring the variable:
contract MetaCoin{
uint counter=0;
}
Maybe do something like:
contract MetaCoint{
function createCounterVariable(){
//creates counter variable
}
}
It will be functionally identical to the declaring the variable, and other functions can access the generated variable somehow. At least this is how I interpret what I'm supposed to do.