So I have a rather large (for me) project, requiring me to have two .cpp files and a header. At least, I think this is what I need, but I'm not completely sure. Anyway, both of the .cpp files #include the header file, but I recieve linker errors because the variables and functions in the header are declared and defined twice (once in each .cpp file). How am I supposed to do this?
Sorry, I wasn't very clear there. (this is as far as I understand it) Because I #include the header file, the contents of the header file are copy\pasted into the .cpp files. Then it (I think) is having a fit, because both .cpp files have the function definitions in them.
You don't need to define them again in each source file. As long as a file includes the header, and the functions are defined somewhere in your source, the file will be able to call them.
The usual approach is to create a cpp file for each header, containing the definitions of the functions.