Fixes main() return should be int in new examples
This commit is contained in:
parent
3c8a923439
commit
75cee948d4
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user