From 6eb3f9123db0e318422ebedc209d13639232d942 Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Fri, 30 Dec 2022 11:44:13 +0800 Subject: [PATCH] added CreateBinaryH.cpp --- CMakeLists.txt | 3 +++ CreateBinaryH.cpp | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 CreateBinaryH.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 28cb41a..99133dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,3 +34,6 @@ ENDIF(WIN32) add_executable(SplitStringTest SplitStringTest.cpp) cm_example_project(SplitStringTest) + +add_executable(CreateBinaryH CreateBinaryH.cpp) +cm_example_project(CreateBinaryH) \ No newline at end of file diff --git a/CreateBinaryH.cpp b/CreateBinaryH.cpp new file mode 100644 index 0000000..bdbbaea --- /dev/null +++ b/CreateBinaryH.cpp @@ -0,0 +1,19 @@ +#include +#include + +using namespace hgl; +using namespace std; + +void main() +{ + char str[9]; + + str[8]=0; + + for(unsigned int i=0;i<256;i++) + { + Integer2Binary(str,i); + + cout<<"constexpr uint8 HGL_B"<