Visual Studio C++ Source file accessible despite no #include? <p>I tried searching for similar questions, but I found this difficult to phrase, so I apologize if this is a duplicate.</p> <p>I'm messing around with Visual Studio 2013, writing a pretty simple C++ Console Application. Without going into too much details, I have three files - file1.h, file2.cpp, and main.cpp</p> <ul> <li>file1.h contains the interface for a class</li> <li>file2.cpp includes file1.h and contains the class's member functions </li> <li>main.cpp includes file1.h</li> </ul> <p>So upon executing my program, I was very surprised that main.cpp had access to the functions inside file2.cpp, despite main only including file1.h.</p> <p>I don't think this is the best way to go about organizing the code, but it piqued my curiosity - how is it that I can access functions contained in file2.cpp from main.cpp, despite the fact that only file1.h is included in main.cpp?</p> <p>It would make sense to me if I had file2.cpp included in file1.h, but I don't.</p> <p><strong>I'm just curious how/why this works. Thanks for reading.</strong></p> <p>EDIT: If I've omitted any critical information, I apologize - just let me know and I can clarify.</p>