diff --git a/README.md b/README.md index 1ea477d..d4e8c40 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,12 @@ CLI tool for converting files into header files which one can use to directly em ### Basic usage -`$ bin2hpp -i ~/my_library.dll --overwrite` will generate an `my_library_dll.h` file in your current working directory containing something similar to the following: +`$ bin2hpp -i my_library.dll -o c_header.h` will generate an `c_header.h` file in your current working directory containing something similar to the following: ```c // Generated by bin2hpp 0.2.4 -#ifndef MY_LIBRARY_DLL_H -#define MY_LIBRARY_DLL_H +#ifndef C_HEADER_H +#define C_HEADER_H #define MY_LIBRARY_DLL_LEN 9728 const unsigned char MY_LIBRARY_DLL[MY_LIBRARY_DLL_LEN] = {0x4d,0x5a,0x90,0x0,0x3,0x0,0x0, ...}; #else @@ -25,6 +25,19 @@ extern const unsigned char MY_LIBRARY_DLL[MY_LIBRARY_DLL_LEN]; #endif ``` +Alternatively, in **C++ mode**: `bin2hpp -i my_library.dll -o cpp_header.hpp --cpp --constexpr --stdarray --i8` + +```cpp +// Generated by bin2hpp 0.2.4 +#if !defined(CPP_HEADER_HPP) +#define CPP_HEADER_HPP +#include +#include +#define MY_LIBRARY_DLL_LEN 9728 +inline constexpr std::array MY_LIBRARY_DLL = {0x4d,0x5a,0x90,0x0,0x3,0x0,0x0, ...}; +#endif +``` + ### Note about CLI arguments Command line arguments are not positional. The input file path argument is the