title: Understanding the ambiguating new declaration of function error
body: <p>I don't understand this error
  here is a link to view the code online:</p>
  
  <p><a href="https://onlinegdb.com/rkirYvU_M" rel="nofollow noreferrer">https://onlinegdb.com/rkirYvU_M</a>  </p>
  
  <p>I am trying to add the names of the drivers, owners, and model to vectors, and we need to use pointers and files.  </p>
  
  <p>Here is my main file:</p>
  
  <pre><code>#include "person.h"
  #include "car.h"
  #include &lt;iostream&gt;
  #include &lt;vector&gt; 
  
  std::vector &lt;Person*&gt;people;
  std::vector &lt;Car*&gt; cars;
  
  int main()
  {
      bool done = false;
  
      Person person;
  
      while(! done)
      {
          std::cout &lt;&lt; "\n Please enter the owners ";
          Person*prompt_info();
          std::cout &lt;&lt; "\n Please enter the drivers ";
          Car*prompt_info();
          Car*set();
          Car*print();
  
      }
      return 0;
  }
  </code></pre>
  
  <p>Here is the person.h file:</p>
  
  <pre><code>#ifndef PERSON_H
  #define PERSON_H
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  //using namespace std;
  
  
  class Person
  {
  
  public:
      Person();
      std::string get_name();
      int get_age();
      void prompt_info();
  
  private:
      std::string name;
      int age;
  
  
  };
  
  #endif 
  </code></pre>
  
  <p>Here is the person.c++ file:</p>
  
  <pre><code>#include "person.h"
  
  Person::Person()
  {
  
  }
  
  
  void Person::prompt_info()
  {
  
      std::cout &lt;&lt; " name: ";
      std::cin &gt;&gt; name;
  
      std::cout &lt;&lt; "enter their age: ";
      std::cin &gt;&gt; age;
  
  }
  
  std::string Person::get_name()
  {
  
      return name;
  
  }
  
  
  int Person::get_age()
  {
      return age;
  
  }
  </code></pre>
  
  <p>Here is the car.h  file:</p>
  
  <pre><code>#ifndef CAR_H
  #define CAR_H
  #include &lt;string&gt;
  #include &lt;iostream&gt;
  #include "person.h"    
  using namespace std;
  class Car
  {    
  public:
      Car();
      std::string get_model();
      Person* get_owner();
      Person* get_driver();
      void print();
      void set(Person _owner,Person get_driver);
      void prompt_info();
  
  private:
      std::string model;
      Person*  owner;
      Person* driver;
  };
  #endif 
  </code></pre>