#include <iostream>#include <stdint.h> void foo(unsigned char ch){ std::cout << "unsigned char" << std::endl;} void foo(uint8_t ui){ std::cout << "uint8_t" << std::endl;} int main(){ unsigned char ch = 0; uint8_t ui = 0; foo(ch); foo(ui); return 0;}
Standard input is empty
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
Standard output is empty
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!