Hi Everyone
i am doing a depth first search array implementation in c++..and there's this push() function which adds items into array with size 8. together with that i need to show the path of the search .. everything that's pushed into the stack automatically comes in the path. should i write path[++order] in the else statement ..
should i write path[++order] in the else statement
Looking at this source I don't see any variable called "path" or "order", so I don't know what that would do, but I would think that using ++top is a good idea here.
What exactly is your problem?
Maybe a modification like this will help you find if you have an issue and where to look for it (there is probably a pop function as well, that should probably get a similar modification to get a complete view).