一般網(wǎng)站服務(wù)器配置高端網(wǎng)站建設(shè)企業(yè)
#include “nlohmann/json.hpp” // 需要安裝 nlohmann/json.hpp 頭文件
using json = nlohmann::json;
下載鏈接:https://github.com/nlohmann/json/tree/develop
1.下載并解壓:首先,需要從nlohmann/json的GitHub倉庫下載源代碼,并解壓得到的文件。 地址:
nlohmann/json: JSON for Modern C++ (github.com)
https://github.com/nlohmann/json/tree/develop
2.拷貝頭文件:解壓后,會(huì)得到一個(gè)名為include的文件夾,將該文件夾下的所有文件拷貝到的工程文件夾下。
3.修改工程屬性:在Visual Studio中,打開項(xiàng)目屬性,找到“C/C++”選項(xiàng)下的“附加包含目錄”,將剛才拷貝的include文件夾的路徑添加進(jìn)去。
1,手動(dòng)編譯與自動(dòng)編譯
手動(dòng)編譯示例
當(dāng)用vs編譯器時(shí),不需要手動(dòng)編譯,在 Visual Studio(