src
utilities
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
main
int main(int argc, char **argv)
Definition:
detect_endian.cpp:20
ecl::is_big_endian
bool is_big_endian()
Determines if your platform is big endian (at compile time).
Definition:
endianness.hpp:44
ecl_config
Author(s): Daniel Stonier
autogenerated on Wed Mar 2 2022 00:13:53