Commit 75cee948 authored by Milo Yip's avatar Milo Yip

Fixes main() return should be int in new examples

parent 3c8a9234
......@@ -22,11 +22,13 @@ struct MyHandler {
bool EndArray(SizeType elementCount) { cout << "EndArray(" << elementCount << ")" << endl; return true; }
};
void main() {
int main() {
const char json[] = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } ";
MyHandler handler;
Reader reader;
StringStream ss(json);
reader.Parse(ss, handler);
return 0;
}
......@@ -5,7 +5,7 @@
using namespace rapidjson;
using namespace std;
void main() {
int main() {
StringBuffer s;
Writer<StringBuffer> writer(s);
......@@ -30,4 +30,6 @@ void main() {
writer.EndObject();
cout << s.GetString() << endl;
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment