编译的死循环问题
梦之安魂曲 2008-12-01 04:31:31 #include "head.h"
class A
{
int x;
public:
A():x(0){}
A(int n):x(n)
{std::cout<<"hello A(int n):x(n)"<<std::endl;}
void Show();
void SetValue(int x);
};
void A::Show()
{
std::cout<<"hello world"<<x<<std::endl;
}
void A::SetValue(int x)
{A::x=x;}
void func()
{std::cout<<"func()"<<std::endl;}
以上是我写的一个头文件,名为head.h。发现编译哭编译时永远没法结束。