Please help me out here

I know this is a very basic blunder I’m doing but plese help me here. If I make a class of a graph then there is no issue,but when I define my graph by vector graph[N], then I can’t get pairs.first;