Compare commits

...

2 Commits

Author SHA1 Message Date
/* User with id == 0 is a fake user from git author */ sauron
3858e49327 commit 2025-08-25 20:30 delete ZCppMainTest/g++_test_000.cpp because of ZCppMainTest/c++_test_000.cpp 2025-08-25 20:30:39 +09:00
/* User with id == 0 is a fake user from git author */ sauron
ec82ddea97 commit 2025-08-25 20:27 add ZCEndian in ZCppMain/ZMainHead.H 2025-08-25 20:27:15 +09:00
2 changed files with 27 additions and 6 deletions

View File

@ -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
{
/*///////////////////////////////////////////////////////////////////////////

View File

@ -24,21 +24,21 @@ int main(int AI_ArgCnt, char* APP_ArgVal[])*/
mingw
g++ -o g++_test_000.exe g++_test_000.cpp -I../
g++ -o c++_test_000.exe c++_test_000.cpp -I../
linux
g++ -o g++_test_000.exe g++_test_000.cpp -I../
g++ -o c++_test_000.exe c++_test_000.cpp -I../
sauron@q381-2673:/mnt/e/my_CPP/ZCpp/ZCppMainTest$ g++ -o g++_test_000.exe g++_test_000.cpp -I../
g++_test_000.cpp: In function ¡®int main(int, char**)¡¯:
g++_test_000.cpp:18:28: error: invalid conversion from ¡®char**¡¯ to ¡®const char**¡¯ [-fpermissive]
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 ¡®int main(int, char**)¡¯:
c++_test_000.cpp:18:28: error: invalid conversion from ¡®char**¡¯ to ¡®const char**¡¯ [-fpermissive]
18 | return Main(AI_ArgCnt, APP_ArgVal);
| ^~~~~~~~~~
| |
| char**
g++_test_000.cpp:9:39: note: initializing argument 2 of ¡®int Main(int, const char**)¡¯
c++_test_000.cpp:9:39: note: initializing argument 2 of ¡®int Main(int, const char**)¡¯
9 | int Main(int AI_ArgCnt=0, const char* APP_ArgVal[]=0)
| ~~~~~~~~~~~~^~~~~~~~~~~~~~