title: Using void* as C++ equivalent of Java Object
body: <p>I am trying to create a class, that contains a <code>std::vector</code> of <code>void*</code>. I have been told, that <code>void*</code> is the C++ equivalent to <code>Object</code> in Java. Since this is the C++ port of a program written in Java it should work in theory.</p>
  
  <p>Java:</p>
  
  <pre><code>ArrayList&lt;Object&gt; list;
  </code></pre>
  
  <p>C++:</p>
  
  <pre><code>vector&lt;void*&gt; list;
  </code></pre>
  
  <p>This won't compile, giving the error: "'reference': illegal use of type 'void'".</p>
  
  <p>Is <code>void*</code> really the C++ equivalent of Java's <code>Object</code>? Am i using it the wrong way?</p>