title: What does the colon do in this struct definition?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/2950029/what-does-unsigned-temp3-means">What does &#39;unsigned temp:3&#39; means</a>  </p>
  </blockquote>
  
  
  
  <p>I don't understand this struct definition. It seems illegal to me, but apparently it isn't:</p>
  
  <pre><code>typedef struct
  {
      unsigned i:1;
  } my_struct;
  </code></pre>
  
  <p>I believe that marking the variable as <code>unsigned</code> without a type is the same as marking it as <code>unsigned int</code>. However, I'm completely baffled by the colon. What does it do? My guess is that it's some sort of initializer, but I haven't a clue what it means. Off the top of my head, the only place that I'd expect a colon in C is in the ternary operator, which this obviously isn't. So, this appears to be a construct with which I am not familiar. Can anyone explain what the purpose of the colon is in this struct definition? What exactly does the declaration <code>unsigned i:1;</code> mean?</p>