title: Type Invalid arguments ' Candidates are: bool treeFromString(const ? &, KDL::Tree &) '
body: <p>Using Eclipse
  Version: Luna Service Release 1 (4.4.1)
  Build id: 20140925-1800</p>
  
  <p>Can someone please explain why I have <code>"const ? &amp;"</code> in uild error</p>
  
  <pre><code>Type Invalid arguments ' Candidates are: bool treeFromString(const ? &amp;, KDL::Tree &amp;) '
  </code></pre>
  
  <p>"treeFromString" Definition is</p>
  
  <pre><code>bool treeFromString(const std::string&amp; xml, KDL::Tree&amp; tree);
  </code></pre>
  
  <p>Full Code given below</p>
  
  <pre><code>#include "kdl_parser/kdl_parser.hpp"
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  #include &lt;fstream&gt;
  
  
  int main(int argc, char** argv)
  {
      //Check to see if xml file provide
      if (argc != 2){
      std::cerr  &lt;&lt; "Usage: full_info input.xml" &lt;&lt; std::endl;
      return -1;
      }
  
      //Get the entire file
      std::string xml_string;
      std::fstream xml_file(argv[1], std::fstream::in);
  
      while ( xml_file.good() )
      {
          std::string line;
          getline( xml_file, line);
          xml_string += (line + "\n");
      }
      xml_file.close();
  
      //Obtain KDL tree, exit if invalid
      KDL::Tree kdl_tree;
  
      if (!kdl_parser::treeFromString(xml_string, kdl_tree)){
          std::cerr &lt;&lt; ("Failed to construct kdl tree") &lt;&lt; std::endl;
          return -1;
      }
  
  }
  </code></pre>