added CreateBinaryH.cpp

This commit is contained in:
2022-12-30 11:44:13 +08:00
parent e4b140c55a
commit 6eb3f9123d
2 changed files with 22 additions and 0 deletions

View File

@@ -34,3 +34,6 @@ ENDIF(WIN32)
add_executable(SplitStringTest SplitStringTest.cpp)
cm_example_project(SplitStringTest)
add_executable(CreateBinaryH CreateBinaryH.cpp)
cm_example_project(CreateBinaryH)

19
CreateBinaryH.cpp Normal file
View File

@@ -0,0 +1,19 @@
#include<hgl/math/Binary.h>
#include<iostream>
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"<<str<<"="<<i<<";"<<endl;
}
}