Here is the error, what I get even with gcc compiler:
put.cc: In function `int main()':
put.cc:3: warning: implicit declaration of function `int puts(...)'
collect2: ld terminated with signal 11 [Segmentation Fault], core dumped
As xp says, can you please post your code screen shot!!