title: Why doesn't the compare method work?
body: <p>I am trying to make vertices only if they don't already exist so in main I do:</p>
  
  <p>p_graph is a pointer to class Graph where I am trying to compare vert1 which is a string to all other strings already in the graph and if it is there, I want to go to the else statement above. In class Graph I have the following code:</p>
  
  <p>but when I look at the code with the debugger iterator "it" doesn't seem to getName(), which is another string in class Vertex, so comparison with string v can be done.  How should I fix this problem?</p>
  
  <p>Here's Vertex Constructor:</p>