Multiple .cpp Files

I should probably know this, but I can't remember how to make a call to a seperate .cpp file. Anyone care to fill me in?
dont take my word on this but i belive its #include <.cpp name>

im just a beginner myself, but i think thats it
You should use a syntax like:
#include "myheader.h"
in your main.cpp (or where you want to insert the cpp file)

Where myheader.h is a header file and inside it you have the declaration of the functions/classes you want in your cpp file.

In the cpp you should insert the definition of your functions/classes (there are exception to this rule but I think that's the general idea).
I think that you can also define and declare a function/class inside a header file with no problem.

THe existence of a cpp is implicit (if you work on a project you should include it in it, if you complie it yourself you should compile it along with main.cpp etc)

I haven't seen any inclusion of cpp files though.
Topic archived. No new replies allowed.