I think Albert is close to the real problem.
In my opinion, these errors come from some bad project settings. You are obviously using MFC libraries but your project settings somehow changed. My guess is: you created a new project (maybe
non-MFC project) and copy/pasted code from another one which settings were different (the previous one was an
MFC project).
I suggest you create a fresh new
MFC project, make sure it compiles before adding your code, and your files one by one. You may use a diff utility to check the differences between files/directories (I personnaly like this one:
http://winmerge.org/[
^])