注册 登录
编程论坛 C++教室

[求助]一个初级问题

kaishiuexi 发布于 2007-09-06 23:01, 406 次点击
struct test
{
test(){}
test(int){}
viod fun(){}
};
viod main(viod)
{
test a(1);
a.fun();
test b();
b.fun(); //error
}

书看的少,请大家帮我详细解答一下吧,谢谢!
1 回复
#2
PcrazyC2007-09-06 23:52
struct test
{
test(){}
test(int){}
void fun(){}
};
int main()
{
test a(1);
a.fun();
test b; //这句有问题,其它有些地方,单词打错了,改了一下.
b.fun(); //error
return 0;
}
1