Type casting in c++
<p>In c++ can we cast an object to an integer ? </p>

<p>Clarifying my question - Suppose i have created an interface that do all the file management thing like file create, open, read, write and i want to have a unique handle of every instance of a file so for this can i create a file handle from every instance of the file interface by just type casting that instance to integer ? </p>

<p>To all - I hope now i am clear.</p>
