title: Default values in a C Struct
body: <p>I have a data structure like this:</p>
  <pre class="lang-c prettyprint-override"><code>struct foo {
      int id;
      int route;
      int backup_route;
      int current_route;
  }
  </code></pre>
  <p>and a function called update() that is used to request changes in it.</p>
  <pre class="lang-c prettyprint-override"><code>update(42, dont_care, dont_care, new_route);
  </code></pre>
  <p>this is really long and if I add something to the structure I have to add a 'dont_care' to EVERY call to update( ... ).</p>
  <p>
  I am thinking about passing it a struct instead but filling in the struct with 'dont_care' beforehand is even more tedious than just spelling it out in the function call. Can I create the struct somewhere with default values of dont care and just set the fields I care about after I declare it as a local variable?
  <pre class="lang-c prettyprint-override"><code>struct foo bar = { .id = 42, .current_route = new_route };
  update(&amp;bar);
  </code></pre>
  <p>What is the most elegant way to pass just the information I wish to express to the update function?</p>
  <p>and I want everything else to default to -1 (the secret code for 'dont care')</p>