title: How to predefine <atomic> variable?
body: <p>I'm doing homework on multithreading and have such template(paste part of it, which i should change):</p>
  
  <pre><code>...
  class MeanCounter : public MeanCounterBase {
  public:
  
  ...
  };
  ...
  </code></pre>
  
  <p>I need to use <code>&lt;atomic&gt;</code> and predefine it in class.</p>
  
  <p>What I did:</p>
  
  <pre><code>class MeanCounter : public MeanCounterBase {
  public:
    std::atomic&lt;unsigned&gt; W;
  
    void MeanCounterBase () {
      W.store(0);
    }
  private:
  ...
  };
  ...
  </code></pre>
  
  <p>But it didn't work at all! Program compile without mistakes. However in all threads at start W is not equal 0. What am I doing wrong?</p>