求大神指点!——为啥运行时说void类型指代不明啊?
#include <iostream.h>class Tpoint
{
int x , y;
pubic:
void setpiont( int x1, int y1)//为什么说void类型在这里指代不明确?
{
x=x1;y=y1;
}
void dispoint()
{
cout <<"("<< x << "," << y << ")" << endl;
}
};
void main()
{
Tpoint a;
TPoint *p=new Tpoint;
a.setpoint(12,6);
cout <<"First point=>";
a.dispoint();
p->setpoint(5,12);
cout <<"Second point=>";
p->dispoint();
}