请问一哈这个程序哪儿错了啊?怎么改呢?
#include <iostream.h>
class Tclass
{
public:
int x,y;
void print()
{cout<<x<<endl<<y<<endl;};
};
int add(Tclass *ptf)
{return (ptf->x+ptf->y);}
void main()
{
Tclass test,*pt;
pt->x=100; pt->y=200;
pt->print();
test.x=150; test.y=450;
test.print();
cout<<"x+y="<<add(&test)<<endl;
}