Hey,

So, my understanding of header files so far are that they're basically code that can be used by multiple .cpp files.

But if you have a prototype in a file.h that's declared in a file.cpp that includes file.h, and then FILE.cpp includes file.h, does FILE.cpp have access to the function defined in file.cpp?

yes. That function can also be called by any *.cpp function that includes file.h. You find this all the time, such as standard header files supplied by your compiler.

// file.h
int foo(); // function prototype
// file.spp
int main()
{
    foo();
    return 0;
}

int foo()
{
    return 0;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.