Software QA (13)
SQL Server (1)
How can I use a preprocessorif expression to ? ....
How can I use a preprocessor #if expression to tell whether a machine's byte order is big-endian or little-endian?
You probably can't. The usual techniques for detecting endianness involve pointers or arrays of char, or maybe unions, but preprocessor arithmetic uses only long integers, and there is no concept of addressing. Another tempting possibility is something like
#if 'ABCD' == 0x41424344
but this isn't reliable, either. At any rate, the integer formats used in preprocessor #if expressions are not necessarily the same as those that will be used at run time.
Are you sure you need to know the machine's endianness explicitly? Usually it's better to write code which doesn't care
2016-02-01, 1044👍, 0💬
How To Enter Numeric Values as HEX Numbers? - MySQL FAQs - Introduction to SQL Basics If you want to...
What is ISO? ISO 9000 is a family of standards for quality management systems. ISO 9000 is maintaine...
How To Export Data to an XML File? - Oracle DBA FAQ - Introduction to Oracle SQL Developer If you wa...
In below sample code if we create a object of class2 which constructor will fire first? Public Class...
When should the register modifier be used? Does it really help? The register modifier hints to the c...