From ec82ddea97e9701e3f53e11342d93459517028b5 Mon Sep 17 00:00:00 2001 From: sauron Date: Mon, 25 Aug 2025 20:27:15 +0900 Subject: [PATCH] commit 2025-08-25 20:27 add ZCEndian in ZCppMain/ZMainHead.H --- ZCppMain/ZMainHead.H | 21 ++++++++++++++++ ZCppMainTest/c++_test_000.cpp | 57 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 ZCppMainTest/c++_test_000.cpp diff --git a/ZCppMain/ZMainHead.H b/ZCppMain/ZMainHead.H index 48106ad..69b610c 100644 --- a/ZCppMain/ZMainHead.H +++ b/ZCppMain/ZMainHead.H @@ -671,6 +671,27 @@ namespace ZNsMain ///////////////////////////////////////////////////////////////////////////////*/ + class ZCEndian + { + public: + + static const unsigned int SUI_Int = 1; + static const unsigned char* const SPC_Char ; + + static const bool SB_IsBig ; + static const bool SB_IsLittle ; + + public: + };/* + class ZCEndian*/ + + const unsigned char* const ZCEndian::SPC_Char = + reinterpret_cast(&ZCEndian::SUI_Int) ; + + const bool ZCEndian::SB_IsBig = (int(ZCEndian::SPC_Char[0]) ==1 ) ; + const bool ZCEndian::SB_IsLittle = (int(ZCEndian::SPC_Char[0]) !=1 ) ; + + class ZCEmpty { /*/////////////////////////////////////////////////////////////////////////// diff --git a/ZCppMainTest/c++_test_000.cpp b/ZCppMainTest/c++_test_000.cpp new file mode 100644 index 0000000..53a5da2 --- /dev/null +++ b/ZCppMainTest/c++_test_000.cpp @@ -0,0 +1,57 @@ + + +#include + + +using namespace std; + + +int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0) +{ + cout<<"Call Main()"<