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