您正在打印功能的地址.
我想你想调用函数并打印它们的返回值.
试试这个
cout << "\nThe surface area of the prism is: " << calculateSurfaceArea(length, width, height) << endl;
cout << "The volume of the prism is: " << calculateVolume(length, width, height) << endl;
Run Code Online (Sandbox Code Playgroud)
代替
cout << "\nThe surface area of the prism is: " << calculateSurfaceArea << endl;
cout << "The volume of the prism is: " << calculateVolume << endl;
Run Code Online (Sandbox Code Playgroud)