我需要检查当前范围内是否存在变量“var1”。
somefunction()
{
...
....
{
......
string var1("");
...
// if i check var1..it should be in scope
// something like inScope(var1)..return true if it is in scope else false
}
// if i check var1..it should be out of scope
// something like inScope(var1)..return true if it is in scope else false
}