object for test class can be created as
test t=50;
// y so..how can integer be equal to object??
// don't we need to call any constructor here or is it some trick of visual studio??...and if it is then how is it possible??
class test
{
public :
int a,b;
test(int x=0,int y=0)
{
a=x;
b=y;
}
};
void g()
{
test t2=50;
cout<<t2.a<<":"<<t2.b<<endl;
}
int main()
{
g();
system("pause");
}
using visual studio 2008