when i use command
gcc BIT_AND.C -o bit_and
and the OS gives me a message:
/tmp/ccXqde6p.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
solution is:
You should use g++
, not gcc
, to compile C++ programs.
postfix '.C' upper letter 'C', it means the file is a C++ source. you should use g++ to compile it.