fork(1) download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4.  
  5. int main(){
  6. char ch = 'x';
  7. int num = ch;
  8. cout<<ch<<" => " << num << endl;
  9. ch = 'µ'; // should now have an extended ascii character
  10. num = ch;
  11. cout<<ch<<" => " << num << endl;
  12. //cout<<" using unsigned "<< (unsigned int) 'µ';
  13. return 0;
  14. }
Compilation error #stdin compilation error #stdout 0s 3468KB
stdin
Standard input is empty
compilation info
prog.cpp:9:7: error: character too large for enclosing character literal type
        ch = 'µ'; // should now have an extended ascii character
             ^
1 error generated.
stdout
Standard output is empty