fork(1) download
  1. #include <iostream>
  2. #include <stdint.h>
  3.  
  4. void foo(unsigned char ch)
  5. {
  6. std::cout << "unsigned char" << std::endl;
  7. }
  8.  
  9. void foo(uint8_t ui)
  10. {
  11. std::cout << "uint8_t" << std::endl;
  12. }
  13.  
  14. int main()
  15. {
  16. unsigned char ch = 0;
  17. uint8_t ui = 0;
  18. foo(ch);
  19. foo(ui);
  20. return 0;
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘void foo(uint8_t)’:
prog.cpp:9:6: error: redefinition of ‘void foo(uint8_t)’
prog.cpp:4:6: error: ‘void foo(unsigned char)’ previously defined here
stdout
Standard output is empty