main裏麵 EnglishWeight test(2,5); std::cout... <<test.temp; 即可打印x+y的結果。 但是temp是public,不符合oop, 本應該封裝的,這個題目有問題。 另外題意是什麽?不是x+y這麽簡單吧?