fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. const wchar_t* wc_str = L"Hello world!";
  7.  
  8. const char* c_str = wc_str;
  9. return 0;
  10. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:8:22: error: cannot convert ‘const wchar_t*’ to ‘const char*’ in initialization
  const char* c_str = wc_str;
                      ^
prog.cpp:8:14: warning: unused variable ‘c_str’ [-Wunused-variable]
  const char* c_str = wc_str;
              ^
stdout
Standard output is empty