Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilo Yip <miloyip@gmail.com>2014-07-12 19:41:01 +0400
committerMilo Yip <miloyip@gmail.com>2014-07-12 19:41:01 +0400
commit75cee948d44876f22f7215b9bd64733c3d7fee51 (patch)
tree223c13a8d34f79a4272c56d392cd9c3d741f67e9 /example
parent3c8a9234399f03d1a4e41b0ef136593dc2667b2c (diff)
Fixes main() return should be int in new examples
Diffstat (limited to 'example')
-rw-r--r--example/simplereader/simplereader.cpp4
-rw-r--r--example/simplewriter/simplewriter.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/example/simplereader/simplereader.cpp b/example/simplereader/simplereader.cpp
index 70df6ba5..ed2bd3bf 100644
--- a/example/simplereader/simplereader.cpp
+++ b/example/simplereader/simplereader.cpp
@@ -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;
}
diff --git a/example/simplewriter/simplewriter.cpp b/example/simplewriter/simplewriter.cpp
index 98da2cbd..98e5b2c3 100644
--- a/example/simplewriter/simplewriter.cpp
+++ b/example/simplewriter/simplewriter.cpp
@@ -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;
}