How to access variables defined and declared in one function in another function?

Viewed 62187

Can anyone tell me how to access variables declared and defined in a function in another function. E.g

void function1()
{
   string abc;
}

void function2()
{
   I want to access abc here.
}

How to do that? I know using parameters we can do that but is there any other way ?

4 Answers
Related