I installed Visual Studio 2010. I wrote a simple code which I\'m sure is correct but unfortunately, when I run the code, I get the error below.
Here is my code:
I came across this problem and none of these solution worked 100%
In addition to ReturnVoid's answer which suggested the change
Project Properties -> Linker -> Output file -> $(OutDir)$(TargetName)$(TargetExt)
I needed to changed
Project Properties -> C/C++ -> Debug Information Format ->
/Zi
This field was blank for me, changing the contents to /Zi
(or /Z7
or /ZI
if those are the formats you want to use) allowed me to debug