sreeR
sreeR

Reputation: 91

RapidJson: error C2061: syntax error: identifier 'stack_'

I am using below code in my program

#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());

When I compile I see error

rapidjson\document.h(2425): error C2061: syntax error: identifier 'stack_' 1> rapidjson\document.h(2425): note: while compiling class template member function 'bool rapidjson::GenericDocument::StartArray(void)' 1> rapidjson\reader.h(2004): note: see reference to function template instantiation 'bool rapidjson::GenericDocument::StartArray(void)' being compiled 1>

Can someone please help me to fix the issue.

Thanks Santhi

Upvotes: 0

Views: 521

Answers (1)

sreeR
sreeR

Reputation: 91

The issue is solved by providing different order

#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>

Upvotes: 0

Related Questions