Problem with debugging in Visual Express 2010
First of all let me specify that I'm working with programs consisting of 2 .cpp files, one with the main() and another one with a class. I'm still very new to programming in general. Running Win 7 32bit.
I have a problem that sometimes, when I debug a program, then make some changes to it and debug again, the program is still the same as before the changes where made. I can save the file and close VS, reopen it, debug and it's still the old code; I have to copy and paste the code into a new project so I can see the changes.
When I try to debug using the step over and step into functions when the program goes to the cpp containing the class and it will say that "the source file is different from when the module was built. Would you like the debugger to use it anyway?", it gives me the option to either go use it anyway or browse to a file; wheter I browse to the file or say to "use it anyway" the arrow will point that it's executing lines where the code WAS before the changes, it can execute lines with nothing on them or lines with commented code, completely skipping any new code added that should be executed.
Let me add the I only work inside VS's project folder, I just create new project and add cpps in source files, I don't save and load cpps all over the place, all files are always in the same project folder.
When I hit build solution it will constantly say that the code is up to date, and the problem sometimes fixes itself after a few more changes and debugs.
This is really getting on my nerves, I asked my professor and he said that it has never happened to him; it's just too hard to code when you barely know any coding and sometimes the debug is showing you stuff you supposedly already fixed, most of the time when my code doesn't work I don't know if my fixes aren't working or if VS is showing me the program from before the fixes where made.
Sorry for wall of text. Hope someone can help me. I already did my googling but only found other people with the same problem and no solutions. I can't switch to other compiler since it's mandatory that I use VS2010. Thanks.