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