title: C++: class atribute in local scope
body: <p>To create my own queue class, I need to declare a class attribute inside a function of this class. </p>
  
  <p>What I am trying to do is :</p>
  
  <p>when I call the function <code>add</code>, the program creates a new attribute to the class, in private, to access after with the operator <code>[]</code>. By this I can create a queue without type restriction, using items of any class. </p>
  
  <p>Is it possible? </p>
  
  <p><strong>Edit</strong></p>
  
  <p>This queue is just a use sample. My really question is: in python i can do this: </p>
  
  <pre><code>class Car:
      def __init__ (self, ...): 
          ...
          self.color = 'blue'
  </code></pre>
  
  <p>Now, color can be used in anywhere of class (remember that don't need insert type to declare a variable in python. In the exemple, color was been declared in <code>__init__</code> scope, but is a class atribute, and not a local variable).
  How I can do something like this in c++? </p>