From 094bef1a09b5c4a50cd190219c8af5beac88b83a Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Wed, 28 Sep 2022 11:24:36 -0400 Subject: [PATCH] Update README.md --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 8339e53..b6a09a0 100644 --- a/README.md +++ b/README.md @@ -190,19 +190,18 @@ When there is a function that would return a pointer-array, there is a wrapper t ``` cpp // raylib -int count; FilePathList files = LoadDirectoryFiles("."); -printf("Count: %i\n", files.count); -for (int i = 0; i < count; i++) { - printf("File: %s\n", files.paths[i]); +TraceLog(LOG_INFO, "Count: %i", files.count); +for (int i = 0; i < files.count; i++) { + TraceLog(LOG_INFO, "File: %s", files.paths[i]); } UnloadDirectoryFiles(files); // raylib-cpp std::vector files = raylib::GetDirectoryFiles("."); -std::cout << "Count: " << files.size() << std::endl; +TraceLog(LOG_INFO, "Count: %i", files.size()); for (auto& file : files) { - std::cout << "File: " << file << std::endl; + TraceLog(LOG_INFO, "File: %s", file.c_str()); } ``` @@ -259,7 +258,7 @@ raylib::Vector2 newDirection = direction.Rotate(30); *raylib-cpp* is a header-only library. This means in order to use it, you must link your project to [raylib](https://www.raylib.com/), and then include [`raylib-cpp.hpp`](raylib-cpp/include/raylib-cpp.hpp). 1. Set up a *raylib* project using the [build and install instructions](https://github.com/raysan5/raylib#build-and-installation) -2. Ensure C++ files are compiled with C++ +2. Ensure `.cpp` files are compiled with C++ 3. Download *raylib-cpp* 4. Include [`include/raylib-cpp.hpp`](include/raylib-cpp.hpp) ``` cpp