Code:// Main.cpp #include<iostream> #include"greet.h" using namespace std; int main() { greetings(); return 0; }Code:// Greet.h void greetings();How is greet.cpp is included in main.cpp?Code://Greet.cpp #include "greet.h" void greetings() { cout<<"hello world"; }
I think #include "greet.h" will include the code from greet.h file to main.cpp and greet.cpp.
But there is no statement to include greet.cpp in main.cpp.
Then why greet.cpp is accessible from main.cpp?