fork download
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. typedef char *pstring;
  8. const pstring cstr = 0;
  9. const pstring *ps;
  10. const char *pchar = 0;
  11.  
  12. cout << typeid(cstr).name() <<endl;
  13. cout << std::is_same<decltype(cstr), char*>::value << endl;
  14. cout << std::is_same<decltype(cstr), char*const>::value << endl;
  15. cout << typeid(ps).name() <<endl;
  16. cout << typeid(pchar).name() << endl;
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0s 4384KB
stdin
Standard input is empty
stdout
Pc
0
1
PKPc
PKc