title: creating multiple objects automatically numbered
body: <p>I've got a basic question. 
  Is it possible to number objects automatically?
  So for example if I have a class 'item' and in the main I have</p>
  
  <pre><code>item item1(weight, length);
  item item2(weight, length);
  </code></pre>
  
  <p>and in the constructor of the item class we assign the weight and length to the corresponding variables. </p>
  
  <pre><code>class item {
  
  public:
  item(int w, int l){
  weight = w ;
  length = l ;
  itemnumber = ??? ;
  
  private:
  int weight;
  int length;
  int itemnumber;
  };
  </code></pre>
  
  <p>But on top of that I also want a variable itemnumber. This itemnumber should be 1 the first time I create an object  (so 1 for item1) and 2 the second object created (item2) and so on. But I don't want to pass it as a parameter. So basically what should I put instead of the '???' in my code ?</p>
  
  <p>Is this possible?</p>