title: Can Virtual Classes in C++ have Member Variables?
body: <p>Suppose I have a purely virtual class, can I do something like this in C++:</p>
  
  <pre><code>class ITreatable
  {
      public:
         bool hasBeenTreated;           // &lt;- Can this be here?
         virtual bool Treat() = 0;
  };
  </code></pre>
  
  <p>And if not, how can I ensure that classes which inherit <code>ITreatable</code> have a member variable called <code>hasBeenTreated</code>? Is that possible? Is there some kind of best practice that avoid having to do this / advises against it?</p>
  
  <p>Thanks</p>
  
  <p>Edit: Also how would I define a constructor for such a class?</p>
  
  <p>Edit2: I understand that public member variables are bad practice, I'm just wondering if the design in general is a good idea in C++ or not.</p>