title: How do I declare an array with a custom class?
body: <p>I'm trying to declare an array with a custom class. When I added a constructor to the class, my compiler complains that there's "No matching constructor for initialization of name[3]". </p>
  
  <p>Here's my program:</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  class name {
    public:
      string first;
      string last;
  
    name(string a, string b){
      first = a;
      last = b;
    }
  };
  
  int main (int argc, const char * argv[])
  {
  
    const int howManyNames = 3;
  
    name someName[howManyNames];
  
    return 0;
  }
  </code></pre>
  
  <p>What can I do to make this run, and what am I doing wrong? </p>