Hi
I have the following code ...
main()
{
....
...
if(var==true)
{
Graph g1=CreateGraph<Graph>(vertex,edge);
}
else
{
Graph1 g1=CreateGraph<Graph1>(vertex,edge);
}
numvertex(g1);
}
When i m calling numvertex() function it says undefined identifier g1 what can be the solution for this. Provided I cannot make define the object globally or at the start of main(). Is there anyway out for this. I also tried making this static but no luck . Means the object scope ends as the If block ends.Plz help...