fork(2) download
  1. #include <iostream>
  2. #include <typeinfo>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7. #define print_type(X) cout << "Type of " #X " is " << typeid(X).name() << endl
  8. print_type(double);
  9. print_type(float);
  10. print_type(3.5);
  11. print_type(3.5f);
  12. }
Success #stdin #stdout 0s 4380KB
stdin
Standard input is empty
stdout
Type of double is d
Type of float is f
Type of 3.5 is d
Type of 3.5f is f