I know that you can use conversion constructor to assign a primitive type to a class:
class X
{
int val;
X(int x) { val=x;}
//...
}
but how do you do it when you need to have main() like this:
int main()
{
INT i=10;
int ii=i;
}
what do I need in the INT class?
Thanks in advance! Cheers!

New Topic/Question
Reply


MultiQuote


|