title: C++ primitive array accessing by class
body: <p>I want to access a primitive type array using a class.
  I'm using Visual C++ 2013</p>
  
  <pre><code>class CInt
  {
  public:
      CInt() { val_ = 0; }
      CInt(int x) { val_ = x; }
  
  private:
      int val_;
  };
  
  int arr[2];
  CInt index;
  
  arr[index] = 2; // ERROR!
  </code></pre>
  
  <p>I tried to overload size_t() operator but still doesn't work.
  Is something like that possible in C++/C++11?</p>