detect_endian.cpp
Go to the documentation of this file.
1 
9 /*****************************************************************************
10 ** Includes
11 *****************************************************************************/
12 
13 #include <iostream>
14 #include "../../include/ecl/config/endianness.hpp"
15 
16 /*****************************************************************************
17 ** Main
18 *****************************************************************************/
19 
20 int main(int argc, char **argv) {
21 
22  if ( ecl::is_big_endian() ) {
23  std::cout << "Platform is big endian." << std::endl;
24  } else {
25  std::cout << "Platform is little endian." << std::endl;
26  }
27  return 0;
28 }
29 
int main(int argc, char **argv)
bool is_big_endian()
Determines if your platform is big endian (at compile time).
Definition: endianness.hpp:38


ecl_config
Author(s): Daniel Stonier
autogenerated on Mon Feb 28 2022 22:16:09