我在使用 Linux - Ubuntu 的 VSCode 程序上使用 VCPKG,但我不知道如何安装我需要的 iostream 或字符串库。
#include <iostream>
#include <string>
using namespace std;
int main() {
string title = "Basic Mathematics Calculator";
cout << title;
int x, y;
cout << "Input a number: ";
cin >> x;
cout << "Input another number: ";
cin >> y;
int sum = x + y;
cout << "Your number is: " << sum << "\n";
cout << "Thank you for using the " << title << "\n";
return 0;
}
如您所见,我包括了 iostream 和字符串“库”,但它们不存在。我一直在尝试安装它们,但我一直收到一条错误消息:
error: building bzip2:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
我试过用线
./vcpkg/vcpkg install zstr
但我不断收到此消息或类似消息:
error: building bzip2:x64-linux failed with: BUILD_FAILED
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.