main里面
EnglishWeight test(2,5);
std::cout... <<test.temp;
即可打印x+y的结果。
但是temp是public,不符合oop, 本应该封装的,这个题目有问题。
另外题意是什么?不是x+y这么简单吧?
main里面
EnglishWeight test(2,5);
std::cout... <<test.temp;
即可打印x+y的结果。
但是temp是public,不符合oop, 本应该封装的,这个题目有问题。
另外题意是什么?不是x+y这么简单吧?
WENXUECITY.COM does not represent or guarantee the truthfulness, accuracy, or reliability of any of communications posted by other users.
Copyright ©1998-2025 wenxuecity.com All rights reserved. Privacy Statement & Terms of Use & User Privacy Protection Policy