One disadvantage of C/C++ is that the predefined integer types can compile to different bit lengths on different architectures (even can be both signed / unsigned – eg char). Therefore, a good practice in scientific computation is to use data types that have clearly specified width to avoid any confusion for readers and irreproducibilities due to having different data types on different computers.
One disadvantage of C/C++ is that the predefined integer types can compile to different bit lengths on different architectures (even can be both signed / unsigned – eg
char
). Therefore, a good practice in scientific computation is to use data types that have clearly specified width to avoid any confusion for readers and irreproducibilities due to having different data types on different computers.See https://en.cppreference.com/w/cpp/types/integer.