title: How to fix "no instance of overloaded function" in vector push_back?
body: <p>I want to write a function which takes as input a pointer to a vector pointer which point to a string (Dictionary) and a pointer which points to a char (p). The function will check if the char is in the Dictionary and if it isn't there it adds the p in the vector Dictionary.</p>
  
  <p>My code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  using std::string;
  using std::vector;
  
  std::vector&lt;string *&gt; dictionary;
  
  void manageDictionary(vector&lt;string *&gt; * dictionary, char *p) {
      for (unsigned int i = 0; i &lt; (*dictionary).size(); i++) {
          string * pstring = (*dictionary).at(i);
          if ((*pstring).compare(p)) {
              (*dictionary).push_back(p);
          }
      }
  }
  </code></pre>
  
  <p>However, the visual studio compiler shows I have an error in the if statement just before the push_back method (<code>.</code>). When I hover on the error, it says "no instance of overloaded function".</p>
  
  <p>I added the <code>std::vector&lt;string *&gt; dictionary;</code> at the beginning, still cannot figure out where the problem is.</p>