title: C++ - struct vs. class
body: <blockquote>
    <p><strong>Possible Duplicates:</strong><br>
    <a href="https://stackoverflow.com/questions/2750270/c-c-struct-vs-class">C/C++ Struct vs Class</a><br>
    <a href="https://stackoverflow.com/questions/146452/what-are-pod-types-in-c">What are POD types in C++?</a>  </p>
  </blockquote>
  
  
  
  <p>Hi,</p>
  
  <p>In the <strong>C++ In a Nutshell book</strong>, in <strong>chapter 6: classes</strong>, unders <strong>Access specifiers</strong>, mentioned the following:</p>
  
  <blockquote>
    <p>In a class definition, the default
    access for members and base classes is
    private. In a struct definition, the
    default is public. <strong>That is the only
    difference between a class and a
    struct</strong>, although by convention, some
    programmers use struct only for <strong>POD
    classes</strong> and use class for <strong>all other
    classes</strong>.</p>
  </blockquote>
  
  <p>My questions here are:</p>
  
  <ul>
  <li>Isn't there another difference between classes and structs in that structs don't hold functions and just hold data?</li>
  <li>What are POD classes? And, what is meant by all other classes here? Are there then special classes?</li>
  </ul>
  
  <p>Thanks.</p>