可能是由于jsoncpp版本问题导致的。应尝试使用较新的jsoncpp版本或将编译标志改成-c++11。示例代码如下:
#include
#include
#include
using namespace std;
int main()
{
Json::Value root;
Json::Reader reader;
ifstream ifs("test.json");
if(!ifs.is_open()) {
cout<<"error: can't open the file!"<