fork(2) download
  1. #include <iostream>
  2. #include <typeinfo>
  3.  
  4. int main()
  5. {
  6. using Arr_t = int[7];
  7. auto arr = new Arr_t;
  8. std::cout << typeid(Arr_t).name() << std::endl;
  9. std::cout << typeid(arr).name() << std::endl;
  10. std::cout << typeid(*arr).name() << std::endl;
  11. std::cout << typeid(arr[0]).name() << std::endl;
  12. std::cout << typeid(new Arr_t).name() << std::endl;
  13. std::cout << typeid(new Arr_t[4]).name() << std::endl;
  14. delete arr;
  15. }
  16.  
Success #stdin #stdout 0s 3472KB
stdin
Standard input is empty
stdout
A7_i
Pi
i
i
Pi
PA7_i