fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.  
  6. char * pt;
  7. pt = new char('x');
  8. cout << *static_cast<uint8_t*>(pt);
  9. return 0;
  10.  
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:35: error: invalid static_cast from type ‘char*’ to type ‘uint8_t* {aka unsigned char*}’
stdout
Standard output is empty