![](/img/trans.png)
[英]I can't use an ofstream object inside of a class in a header file in C++
[英]I can't use c++ format header
嗨,我正在進行基本的 c++ 測試,答案是必需的,所以我寫了 #include 但發生錯誤錯誤消息是 header 不存在
#include <iostream>
#include <format>
#include <string>
using namespace std;
int main()
{
string str = format("{}+{}+{}", 16, 14, 30);
cout << str << endl;
return 0;
}
<format>
是 C++ 20 功能。 您應該檢查您的測試站點的 C++ 版本
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.