How to fix the error, please do not downvote this because it is too trivial I have just started to learn my first language.
It is always recommended to include code as text instead of linking images. If you will be downvoted this could be the reason. ;)
Possibly dupe of this thread of SO.
Coming to your question, your code should compile correctly. When that linking error occurs, it is probably because the executable is in use (probably you executed it and clicking on the shell made the execution "freeze").
The collect2.exe: ld returned 1 exit status error is a consequence of an error that came before it. Not sure if this'll help, but try re-naming int value() to int main().
collect2.exe: ld returned 1 exit status
Please login first before posting an answer.