And how do you find out the augmenting path from source to sink? Using modified version of BFS. You do BFS from source till you reach sink and you traverse an edge only if it has residual capacity (i.e. for that edge, its max capacity - current flow > 0). And for this path from source to sink, you maintain minimum residual capacity, which is the maximum flow you can pass through that path. High level code snippet to get the idea:
bool maxFlowAchieved = false;
int maxFlow = 0; // keeps track of what is the max flow in the network
while(!maxFlowAchieved)
{
//BFS returns collection of Edges in the traversal order from source to sink
std::vector<Edge*> path = BFS(source, sink);
maxFlowAchieved = path.size() == 0; // all paths exhausted
if(maxFlowAchieved)
break;
// traverse each edge in the path and find minimum residual capacity
// edge->residual = edge->maxCapacity - edge->currentflow
int allowedFlow = GetMinResidualOnPath(path);
// Now add additional flow to each edge in the path.
// i.e. for each edge in path, edge->currentflow += allowedFlow
// clearly, edge->currentflow + allowedFlow <= edge->maxCapacity
SaturatePath(path, allowedFlow);
maxFlow += allowedFlow;
}
return maxFlow;