My Visual C++ compiler compiles out of date source -


I'm the first to use Microsoft Visual C ++ Express 2010 for Windows programming. I use a native code The new C ++ app is not created, is not managed or MFC had Visual Studio for me to create a window with simple menu (chat.cpp) for making simple window code for me. I have modified this file and I am able to compile properly and make my changes effective.

Now I've added another source file in the solution (Intro.cpp), which I include in my header, it works just fine from within Chat.cpp, but for a problem Along with the compiler sometimes does not apply my code changes: I make many edits, compile it again and the "old" code is in progress. Then, after a while, after just doing a little modification, the compiler seems to "hold" and it runs the new code, including all previous changes made by me.

Is there a cache? Do I need to say the compiler, which compiles to file and which object links to the file? Did I make a mistake when I added the file to the solution?

what is intro.cpp a header file? Is it also in your solution?

It is difficult for me to think that such a mature IDE is a bug in this area, so I will first check your file list. Ensure that the Solution Explorer shows all that you have been adding and editing, this is a list of VS for determining reconstruction. Need to use

EDIT: I believe that it is not clear from your description that why it will fail now though, usually the code does not contain the code in the header file, it works in another way ( Except classroom template header files, such as STL header). There is some discussion about the pros and cons, on the contrary, the most compelling argument for me in favor of the code, instead the header file has interface , while the implementation in the code file it happens.

I will try to reconstruct my code in another traditional structure where intro.h is included in intro.cpp and any other needs it, and it also has chat.cpp with it. Then your compilation units are intro.cpp and chat.cpp, and they depend on the respective header files, so it is provided that they are properly listed in the Solution Explorer, all should work. You can clear build dependencies to avoid duplicates and once you work you can reduce it.


Comments