Converting from var to var&
<p>How can I convert a variable of type <code>var</code> or <code>var*</code> to <code>var&amp;</code></p>

<p>I've to use a function which takes an object of var class(suppose there's a class). The example code was given like this:-</p>

<pre><code>testFunc(false, namespace1::namespace2::var(), 100);
</code></pre>

<p>in function declaration it says that the second parameter is of type <code>namespace1::namespace2::var&amp;</code>, I can create <code>namespace1::namespace2::var</code> or <code>namespace1::namespace2::var*</code>, but how do I create <code>namespace1::namespace2::var&amp;</code>?</p>

<p>I know that's too basic question but I couldn't figure it out.</p>

<p><strong>Edit:</strong><br>
I've tried using just <code>var</code>, but it gives some odd errors. I am pretty sure that's some kind of fault in the function I am using. Here're the errors:-</p>

<pre><code>Error   3   error C2825: 'CType': must be a class or namespace when followed by '::'
Error   4   error C2039: 'TypeCode' : is not a member of '`global namespace''
Error   5   error C2146: syntax error : missing ',' before identifier 'TypeCode'
Error   6   error C2065: 'TypeCode' : undeclared identifier 
Error   7   error C3203: 'CustomType' : unspecialized class template can't be used as a template argument for template parameter 'Base', expected a real type   
</code></pre>

<p><strong>Edit 2</strong>  </p>

<p>I thought it'd be hard to answer if I include real code, since it's complicated. But have a look if it helps. The real function's signature is like this:-</p>

<pre><code>virtual bool opRaiseEvent(bool reliable, const Common::Hashtable&amp; parameters, nByte eventCode, nByte channelID=0, int* targetPlayers=NULL, short numTargetPlayers=NULL);
</code></pre>

<p>and the example code used the function like this:-  </p>

<pre><code>mLoadBalancingClient.opRaiseEvent(false, ExitGames::Common::Hashtable(), 100);
</code></pre>

<p>which was working fine. But now I want to add data to the HashTable, so I need to create an object of it and then pass it to the function. It's not accepting a pointer or normal variable. I don't know why it's working with just HashTable().</p>
