【问题标题】:RapidJson: error C2061: syntax error: identifier 'stack_'RapidJson:错误 C2061:语法错误:标识符“stack_”
【发布时间】:2019-10-29 00:22:45
【问题描述】:

我在我的程序中使用下面的代码

#include "stdafx.h"
#include "RapidJson\rapidjson.h"
#include "RapidJson\document.h"
#include "RapidJson\stringbuffer.h"
using namespace std;
using namespace rapidjson;
....
,......

Document doc;
doc.Parse(s.c_str());

编译时出现错误

rapidjson\document.h(2425):错误 C2061:语法错误:标识符“stack_” 1> rapidjson\document.h(2425): 注意:编译类模板成员函数'bool rapidjson::GenericDocument::StartArray(void)' 1> rapidjson\reader.h(2004): 注意:参见正在编译的函数模板实例化 'bool rapidjson::GenericDocument::StartArray(void)' 1>

谁能帮我解决这个问题。

谢谢 桑蒂

【问题讨论】:

    标签: visual-c++ rapidjson


    【解决方案1】:

    通过提供不同的顺序来解决问题

    #include "targetver.h"
    
    #include <stdio.h>
    #include <new>
    #include <tchar.h>
    
    #include <rapidjson.h>
    #include <document.h>
    #include <stringbuffer.h>
    #include <writer.h>
    #include <prettywriter.h>
    
    #include <Windows.h>
    #include <vector>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-04-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-06-17
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多