fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. float mi_caracter = "a";
  6. printf("el carácter es: %c", mi_caracter);
  7. return 0;
  8. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:5:22: error: cannot convert ‘const char*’ to ‘float’ in initialization
  float mi_caracter = "a";
                      ^~~
prog.cpp:6:9: warning: format ‘%c’ expects argument of type ‘int’, but argument 2 has type ‘double’ [-Wformat=]
  printf("el carácter es: %c", mi_caracter);
         ^~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~
stdout
Standard output is empty