I'm having some serious issues with Visual Studio 2013. I have C++ console project with 2 files: Main.cpp and A.cpp, I'm importing A.cpp with #include "A.cpp" in Main.cpp.
Here is the problem: When I edit A.cpp and run Main.cpp, the changes do not occur. I have to change Main.cpp as well and only then will Visual Studio notice the change and recompile everything properly.
This is extremely annoying when I'm trying to change something in A.cpp, any idea how to fix this?
EDIT:
I have tried renaming A.cpp to A.hpp and include A.hpp from Main.cpp with same result: changes to A.hpp do not occur in build until I change Main.cpp as well. I have tried putting A.hpp to both header files and source files in the solution explorer, still the same results.
A.cppinto VS project. BTW, unless you know what you are doing, you should never include.cppfiles into each other. C++ is not Java.A.cppto the VS project? I see bothMain.cppandA.cppin theSource Filesfolder in the Solution explorer.A.h. If not, then create one and add it. You can show a minimal working example so people can judge what's wrong you're are doing.A.cppis already included in the project. Do what user @VolAnd suggested and create a corresponding header fileA.hand include it instead ofA.cppin main.