title: Define object in public but create it in Constructor
body: <p>What I would like to do is similar to this (working):</p>
  
  <pre><code>class Claw {
    public:
      Claw(int pin);
    private:
      int pin;
    };
  
  Claw::Claw(int pinNumber) {
    pin = pinNumber;
    }
  </code></pre>
  
  <p>But I want to do it with classes instead of basic types. I want to define the class in the private section (so I can use it on all the object) and execute the <code>AccelStepper</code> constructor in the <code>Wheel</code> constructor. I've tried these two solutions and they both give different errors:</p>
  
  <pre><code>class Wheel {
    public:
      Wheel(int pin);
    private:
      AccelStepper stepper;
    };
  
  Wheel::Wheel(int pinNumber) {
  
    // This doesn't work
    AccelStepper stepper(AccelStepper::DRIVER, pinNumber, 1);
  
    // This also doesn't work
    stepper(AccelStepper::DRIVER, pinNumber, 1);
    }
  </code></pre>
  
  <p>How can I achieve what I'm trying to do?</p>
  
  <p>Note that this works, but I cannot pass the pin number then:</p>
  
  <pre><code>class Wheel {
    public:
      Wheel();
    private:
      AccelStepper stepper(5);
    };
  
  Wheel::Wheel() {
    }
  </code></pre>