commit 2025-08-25 20:27 add ZCEndian in ZCppMain/ZMainHead.H
This commit is contained in:
@ -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<const unsigned char*>(&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
|
class ZCEmpty
|
||||||
{
|
{
|
||||||
/*///////////////////////////////////////////////////////////////////////////
|
/*///////////////////////////////////////////////////////////////////////////
|
||||||
|
57
ZCppMainTest/c++_test_000.cpp
Normal file
57
ZCppMainTest/c++_test_000.cpp
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
|
||||||
|
|
||||||
|
#include<iostream>
|
||||||
|
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0)
|
||||||
|
{
|
||||||
|
cout<<"Call Main()"<<endl; return 0;
|
||||||
|
}/*
|
||||||
|
int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0)*/
|
||||||
|
|
||||||
|
|
||||||
|
int main(int AI_ArgCnt, char* APP_ArgVal[])
|
||||||
|
{
|
||||||
|
return Main(AI_ArgCnt, APP_ArgVal);
|
||||||
|
}/*
|
||||||
|
int main(int AI_ArgCnt, char* APP_ArgVal[])*/
|
||||||
|
|
||||||
|
|
||||||
|
/*################################################################################
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD> mingw <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
g++ -o c++_test_000.exe c++_test_000.cpp -I../
|
||||||
|
|
||||||
|
<EFBFBD><EFBFBD> linux <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
|
g++ -o c++_test_000.exe c++_test_000.cpp -I../
|
||||||
|
|
||||||
|
|
||||||
|
sauron@q381-2673:/mnt/e/my_CPP/ZCpp/ZCppMainTest$ g++ -o c++_test_000.exe c++_test_000.cpp -I../
|
||||||
|
c++_test_000.cpp: In function <20><>int main(int, char**)<29><>:
|
||||||
|
c++_test_000.cpp:18:28: error: invalid conversion from <20><>char**<2A><> to <20><>const char**<2A><> [-fpermissive]
|
||||||
|
18 | return Main(AI_ArgCnt, APP_ArgVal);
|
||||||
|
| ^~~~~~~~~~
|
||||||
|
| |
|
||||||
|
| char**
|
||||||
|
c++_test_000.cpp:9:39: note: initializing argument 2 of <20><>int Main(int, const char**)<29><>
|
||||||
|
9 | int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0)
|
||||||
|
| ~~~~~~~~~~~~^~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest
|
||||||
|
# date
|
||||||
|
Mon Aug 25 01:39:11 KST 2025
|
||||||
|
|
||||||
|
Administrator@q381-2673 UCRT64 /e/my_CPP/ZCpp/ZCppMainTest
|
||||||
|
# g++ --version
|
||||||
|
g++.exe (Rev2, Built by MSYS2 project) 13.2.0
|
||||||
|
Copyright (C) 2023 Free Software Foundation, Inc.
|
||||||
|
This is free software; see the source for copying conditions. There is NO
|
||||||
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################*/
|
Reference in New Issue
Block a user