struct Date
{
int day;
int month;
};

Date today;
today.day=11;

Date * p=New Date;
(*p).day=11 等於 p->day=11;

透過指標存取成員這兩種方式都是一樣的效果。
相关文章