"指针"与"类"
#include <iostream>using namespace std;
class Human
{
public:
Human(){cout<<"构造函数执行中...\n";i=999;}
private:
int i;
};
int main()
{
Human *p=new Human;
return 0;
}
Q1:main函数中的第2行一定要用Human类的指针嘛?
如果不行为什么?
2010-04-04 13:18

2010-04-04 13:53
2010-04-04 14:41
可以...
2010-04-04 15:42


2010-04-04 17:05
2010-04-05 10:25
2010-04-13 00:32
2010-04-13 18:58
2010-04-14 06:48

2010-04-14 11:03