student*pt=std;//std是对象数组;
cout<<(*pt+1).score; //score声明为public; × 编译会显示 [Error] no match for 'operator+' (operand types are 'student' and 'int')
√ cout<<(*++pt).score;
欢迎分享,转载请注明来源:内存溢出
student*pt=std;//std是对象数组;
cout<<(*pt+1).score; //score声明为public; × 编译会显示 [Error] no match for 'operator+' (operand types are 'student' and 'int')
√ cout<<(*++pt).score;
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)