C++程序员都进来挑战一下
请问下面程序的输出是什么?
class foo2
{
public:
foo2()
{
k = m = 100;
printf("\n foo2::foo2()\n");
}
foo2( const foo2& rhs)
{
k = rhs.k;
m = rhs.m;
printf("\n foo2::foo2() copy constructor, m = %d,k = %d \n", m, k);
}
foo2& operator=( const foo2& rhs)
{
printf("\n foo2::operator=\n");
return *this;
}
int k;
int m;
};
int _tmain(int argc, _TCHAR* argv[])
{
foo2 theFooA = theFooA;
_getch();
return 0;
}