title: Static data member in an unnamed class C++
body: <p>I read in the below link that unnamed(anonymous) class should not have static data memebers in it. Could anyone please let me know the reason for it?</p>
  
  <p><a href="https://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.cbclx01/cplr038.htm" rel="noreferrer">https://www-01.ibm.com/support/knowledgecenter/SSLTBW_2.1.0/com.ibm.zos.v2r1.cbclx01/cplr038.htm</a>
  says the below..</p>
  
  <blockquote>
    <p>You can only have one definition of a static member in a program.
    Unnamed classes, classes contained within unnamed classes, and local
    classes cannot have static data members.</p>
  </blockquote>