Linked list with different elements , possible?
<p>Hya, </p>

<p>Lemme explain my point .</p>

<pre><code>template&lt;typename T&gt;
class node{
T data;
template&lt;typename X&gt;
node&lt;X&gt;* right; // can point to any node&lt;typename&gt; i know its wrong
}
</code></pre>

<p>so that i can do something like :</p>

<pre><code>node&lt;int&gt; a;
a.data = 23;
node&lt;float&gt; b;
b.data =43.6;
a.right= b;
std::cout&lt;&lt; a.data &lt;&lt;a.right-&gt;data;
</code></pre>

<p><strong>Another example:</strong></p>

<pre><code>template &lt;class Type&gt;
struct vnode {
Type data;
vnode&lt;Type&gt; * vnodenext;
// vrow what_to_put_here // **i don't want to use void ptrs neither want to cast back manually**
}
</code></pre>

<p>And in main function if i define vnode struct of type type string and another vnode of int ,then what pointer def should i replace with vrow in vnode struct definition , so that it can point to vnode of type int or other type of vnode e.g</p>

<pre><code>vnode&lt;string&gt; mystring;
vnode&lt;int&gt; myint;

myint.vrow = &amp;mystring
</code></pre>

<p>Thanks alot)</p>
