Fixes main() return should be int in new examples

This commit is contained in:
Milo Yip 2014-07-12 23:41:01 +08:00
parent 3c8a923439
commit 75cee948d4
2 changed files with 6 additions and 2 deletions

View File

@ -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;
}

View File

@ -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;
}