title: Pointer passing to function header
body: <p>I have another problem regarding pointers.</p>
  
  <p>I have a function with the following header:</p>
  
  <pre><code> addActor (NxuPhysicsCollection &amp;c, NxActor &amp;a, const char *userProperties=0, const char *actorId=0)
  </code></pre>
  
  <p>And I am trying to use it like this:</p>
  
  <pre><code> NXU::NxuPhysicsCollection* collection = new NXU::NxuPhysicsCollection();
   NxActor* actor = *actors++;
   NXU::addActor(collection, actor, NULL, NULL);
  </code></pre>
  
  <p>But I get the following error:</p>
  
  <blockquote>
    <p>A reference of type "NXU::NxuPhysicsCollection&amp;" (not const-qualified) cannot be initialised with   a value of type "NXU::NxuPhysicsCollection*"  (this is for the collection parameter, same error appears for actor as well)</p>
  </blockquote>
  
  <p>How am I supposed to pass the collection and actor parameters to the function in order to work properly?</p>
  
  <p>I tried this:</p>
  
  <pre><code> NXU::addActor(&amp;collection, &amp;actor, NULL, NULL);
  </code></pre>
  
  <p>But that doesn''t work either, it gives me the error:</p>
  
  <pre><code> "Initial value of reference to non-const must be a lvalue."
  </code></pre>
  
  <p>Any help is greatly appreciated.</p>
  
  <p>Edit: If I use it like this:</p>
  
  <pre><code>NXU::addActor((NXU::NxuPhysicsCollection&amp;)collection, (NxActor&amp;)actor, NULL, NULL);
  </code></pre>
  
  <p>It does not give me errors anymore. Is this correct?</p>
  
  <p>I must mention that NXU and NX namespaces are closed source and I cannot modify the way they are implemented</p>