来自程序的奇怪输出

时间:2016-03-09 00:55:18

标签: c++

我编写了以下代码,但输出显示了CredentialsProvider credentialsProvider = new BasicCredentialsProvider(); credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("username", "password")); CloseableHttpClient httpClient = HttpClientBuilder.create().setDefaultCredentialsProvider(credentialsProvider).build(); 行的奇怪值。我不知道它来自何处或如何解决它。

code

1 个答案:

答案 0 :(得分:5)

您正在打印功能的地址

我想你想调用函数并打印他们的返回值

试试这个

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;

而不是

cout << "\nThe surface area of the prism is: " << calculateSurfaceArea << endl;
cout << "The volume of the prism is: " << calculateVolume << endl;