I don't understand why this programs produces differents outputs between Linux and Windows using the same compiler. In Windows it outputs float and in Linux it outputs f.
#include <typeinfo>
#include <iostream>
int main() {
std::cout << typeid(float).name() << std::endl;
return 0;
}
The
typeid
operator returns the name from thestd::type_info
, which is described asSo it is implementation-specific how they choose to name the types. This is reinforced again in
std::type_info::name