回复 2楼 Jonny0201
int main()
{
Stock stocks[4]={Stock("Nan",12,20.0),Stock("Bof",200,2.0),Stock("Mon",130,3.25),Stock("fle",60,6.5)};
int st;
for(st=0;st<4;st++)
stocks[st].show();
const Stock * top = &stocks[0];
for(st=1;st<4;st++)
top=&top->topval(stocks[st]);