C++ 函数重载示例:TestClass 类中的 func 函数
#include
int main(){ TestClass obj; std::cout << obj.func(5) << std::endl; // Output: 5 std::cout << obj.func(5, 10) << std::endl; // Output: 15
return 0;
}
原文地址: https://www.cveoy.top/t/topic/qjA8 著作权归作者所有。请勿转载和采集!