fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. char str_arr[] = "ads";
  6. char *str_ptr = str_arr;
  7.  
  8. char **ptr_str_ptr = &str_ptr; // OK
  9. char* const* ptr_const_str_arr = &str_arr;
  10. return 0;
  11. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function 'int main()':
prog.cpp:9:36: error: cannot convert 'char (*)[4]' to 'char* const*' in initialization
  char* const* ptr_const_str_arr = &str_arr;  
                                    ^
stdout
Standard output is empty