I have a function which takes input either through STDIN or from input file.It works well for the former case but in the latter case it is not returning to the main function after completing the traversal.Can somebody tell me the error which I have made?
I'm not a pro but I think the function isn't returning because it's a void function. In addition, I don't see it trying to return anything because it only says "return; "
When you say it's not returning you mean return a value (as the above users assumed) or return control after completing its task meaning has an infinite loop or something?
I check your code and although you define a function there are missing definition for various variables. Is this function member function of a class, do you declare this variables globally or what?