Commit 78c75de2 authored by Philipp A. Hartmann's avatar Philipp A. Hartmann

tutorial.cpp: update for FindMember change

 * use MemberIterator instead of plain pointer
 * check against MemberEnd() instead of NULL
parent 86c47a6a
......@@ -44,8 +44,8 @@ int main(int, char*[]) {
printf("hello = %s\n", document["hello"].GetString());
// Since version 0.2, you can use single lookup to check the existing of member and its value:
Value::Member* hello = document.FindMember("hello");
assert(hello != 0);
Value::MemberIterator hello = document.FindMember("hello");
assert(hello != document.MemberEnd());
assert(hello->value.IsString());
assert(strcmp("world", hello->value.GetString()) == 0);
(void)hello;
......
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