title: C++ struct constructor
body: <p>I tried to create my own structure. So I wrote this piece of code.</p>
  
  <pre><code>struct node
  {
      int val, id;
      node(int init_val, int init_id)
      {
          val = init_val;
          id = init_id;
      }
  };
  
  node t[100];
  
  int main()
  {
  ...
  }
  </code></pre>
  
  <p>I tried to compile my program. But I got an error:</p>
  
  <pre><code>error: no matching function for call to 'node::node()'
  note: candidates are:
  note: node::node(int, int)
  note: candidate expects 2 arguments, 0 provided
  note: node::node(const node&amp;)
  note: candidate expects 1 argument, 0 provided
  </code></pre>