diff --git a/doc/ref/jsonschema/jsonschema.md b/doc/ref/jsonschema/jsonschema.md index a15b836e8..18e57ef9c 100644 --- a/doc/ref/jsonschema/jsonschema.md +++ b/doc/ref/jsonschema/jsonschema.md @@ -399,8 +399,7 @@ auto resolve = [](const jsoncons::uri& uri) -> json std::cout << "Requested URI: " << uri.string() << "\n"; std::cout << "base: " << uri.base().string() << ", path: " << uri.path() << "\n\n"; - std::string pathname = "./input/jsonschema"; - pathname += std::string(uri.path()); + std::string pathname = "./input/jsonschema" + std::string(uri.path()); std::fstream is(pathname.c_str()); if (!is) diff --git a/examples/src/jsonschema_examples.cpp b/examples/src/jsonschema_examples.cpp index 33888adfe..f318d6fad 100644 --- a/examples/src/jsonschema_examples.cpp +++ b/examples/src/jsonschema_examples.cpp @@ -126,8 +126,7 @@ void resolve_uri_example() std::cout << "Requested URI: " << uri.string() << "\n"; std::cout << "base: " << uri.base().string() << ", path: " << uri.path() << "\n\n"; - std::string pathname = "./input/jsonschema"; - pathname += std::string(uri.path()); + std::string pathname = "./input/jsonschema" + std::string(uri.path()); std::fstream is(pathname.c_str()); if (!is)