Topological sort using recursive DFS
First, there are some problems with your code:


You allocate memory for bool *visited but never free it again. Use delete[] visited when you don't need it anymore.
The condition in if(f&lt;=rhs.f &amp;&amp; f&gt;=rhs.f) is true if and only if f == rhs.f. If that was what you wanted to check, then code it that way.
In line 26 you define the global variable i which is never used because it is hidden by the definition of a local i in main(), line 66. 


These aside your code could be improved in the following ways:

Avoid mixing C and C++ programming styles


When choosing C++ and STL, go all the way. You already use std::vector for storing edges and nodes, so use one for visited. A vector does memory allocation and deallocation for you which is less error prone.
Use C++'s std::cout and std::cin instead of C's printf and scanf functions. See this answer for reasons why.
Stick to a set of rules for formatting your code. For example, you're inconsistent when it comes to spaces in variable definitions (see lines 26 and 27) and for statements (see lines 32 and 70) and when using {} brackets with single statement if and for scopes (see loops in lines 32 and 47).
Don't use global variables unless you have to. The definitions of node1 and node2 for example can be moved where they are needed, and myTime could be changed into a static variable of your dfsVisit function. To eleminate the other global definitions you can for example define them in main and pass them as needed by reference to dfs.
Move the definition of i inside the for statement where it is used. There is no need for it outside the fors scope.
Do bounds checking as early as possible. You know that M and N have to be between 0 and 100, so check them once you read them. Also do something when you detect an error, don't just silently ignore invalid node values.
Use node values starting by 1. Currently you read the value, decrease it by 1 and add 1 again to print it. Your program never relies on zero based node values.
Set node1.value once per rule by moving the statement one scope up because if never changes in the while loop at line 78.
When swapping the order of your dfsVisit and dfs functions you don't need the forward declaration of dfsVisit anymore.
Your nodes get copied alot. Each edge gets a copy of two nodes. You could instead use a std::map&lt;int, node&gt; for storing your nodes by value. An edge is then simply a pair of node values.
Consider an extra struct edge instead of using std::pair. Yes, it is extra code you don't necessarily need, but using edge.source and edge.target is more expressive than edge.first and edge.second which could be anything.
visited is a property of a node, so add bool node::visited and use this value instead of an external variable. Doesn't work unless you also implement #10, because the other edges' copies of the node don't get automagically updated when you set node.visited to true.


Consider an object oriented style instead of functional programming

If you encapsulate your algorithm in a class you can easily get rid of the global variables. Implement class methods for data input and validation and for the actual DFS. You could even split data management and DFS implementation into separate classes.