fork download
  1. #include <iostream>
  2.  
  3. int main(){
  4. int a[10][10];
  5. int **ptr = static_cast<int **>(a);
  6. std::cout<<a<<'\n'<<ptr<<'\n';
  7. std::cout<<*a<<'\n'<<*ptr<<'\n';
  8. return 0;
  9. }
  10.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:5: error: invalid static_cast from type ‘int [10][10]’ to type ‘int**’
stdout
Standard output is empty