not calling the right constructor
<p>So here is my header:</p>

<pre><code>//warehouse.h
#ifndef WAREHOUSE_H
#define WAREHOUSE_H
#include&lt;string&gt;
#include&lt;map&gt;
#include "dates.h"

namespace a4
{
  class warehouse
  {
      public:
          warehouse(std::string name, std::string start_date);

      private:
          std::string name;
          std::string busiest_day;
          int most_transactions;
          dates current_date;
          std::map&lt;std::string, a4::food&gt; items;
          void next_day();

  };
}
#endif
</code></pre>

<p>My .cc:</p>

<pre><code>//warehouse.cc
#include "warehouse.h"
#include "dates.h"
namespace a4
{
 //constructor
 warehouse::warehouse(std::string wname, std::string start_date)
 {
     wname = name;
     current_date = dates(start_date);

 }
 void warehouse::next_day()
 {
     current_date.next_day();
 }
}
</code></pre>

<p>And the compiler error:</p>

<pre><code>warehouse.cc: In constructor ‘a4::warehouse::warehouse(std::string, std::string)’:
warehouse.cc:6: error: no matching function for call to ‘a4::dates::dates()’
dates.h:10: note: candidates are: a4::dates::dates(std::string)
dates.h:8: note:                 a4::dates::dates(const a4::dates&amp;)
</code></pre>

<p>From the error it looks like its calling a zero argument constructor instead of the constructor that takes a string. The dates class i built doesn't have a zero argument constructor obviously.</p>

<p>Ive been trying to figure this out for hours any help would be appreciated. In a similar question I was told to look up member initializer lists. I have and don't really understand how to implement it right I guess, cause it doesn't seem to solve the problem.</p>

<p>Were only a few weeks into the semester and this is my first class on c++, go easy on me :)</p>
