title: Size of Vector from pointer
body: <p>I am writing a class, BitVector, where I have a method that returns the capacity of a BitVector.  My thought was to call the std::vector capacity(), but I am getting an error I'm a bit confused about.  Below is my method: </p>
  
  <pre><code>int BitVector::Size() {
  int size = (int) this-&gt;bitVector().capacity();
  }
  </code></pre>
  
  <p>The error I am running into is "expression proceeding parentheses of apparent call must have (pointer-to-) function type.  What is the issue here?</p>
  
  <p>Additional background info about my class:</p>
  
  <p>My BitVector class has the usual public constructors, deconstructors, etc. and then a private pointer to a vector as follows:</p>
  
  <pre><code>private:
  std::vector&lt;uint8_t&gt;* bitVector;
  </code></pre>
  
  <p>In my constructor, I point the pointer to a vector on the heap like so:</p>
  
  <pre><code>BitVector::BitVector(int numBits) {
  this-&gt;bitVector = new std::vector&lt;uint8_t&gt; (numBits, 0);
  }
  </code></pre>