0
林:C++ - RapidJSON有使用此代碼段將字符串化一個DOM與rapidjson沒有成員作家
rapidjson::StringBuffer buffer;
rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
document.Accept(writer);
,但我得到的錯誤Writer是不是rapidjson命名空間中的一員。
我的包括有:
#include "rapidjson/document.h"
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
#include <iostream>
如示例simpledom.cpp提及。
所以我的問題是,如果這是一個錯誤,或者它需要另一個作家類呢? 我錯過任何包括?我使用最新版本的rapidjson。
奇怪,如果你在頂部寫'使用namespace rapidjson',它會改變什麼嗎?即你污染了全局命名空間 – 2014-10-05 14:14:12
嘿,我也嘗試過使用全局命名空間,但它也沒有工作。我使用VS2012作爲編輯器。也許這只是VS拋出的錯誤。我沒有嘗試編譯它。 – Chocolate 2014-10-05 14:18:20
嘗試編譯,這可能與intellisense – 2014-10-05 14:19:38