title: What are the differences between struct and class in C++?
body: <p>This question was <a href="https://stackoverflow.com/questions/13049">already asked in the context of C#/.Net</a>.</p>
  
  <p>Now I'd like to learn the differences between a struct and a class in C++. Please discuss the technical differences as well as reasons for choosing one or the other in OO design.</p>
  
  <p>I'll start with an obvious difference:</p>
  
  <ul>
  <li>If you don't specify <code>public:</code> or <code>private:</code>, members of a struct are public by default; members of a class are private by default.</li>
  </ul>
  
  <p>I'm sure there are other differences to be found in the obscure corners of the C++ specification.</p>