Multiple method definition - linking

So I have this project I've been working on and all files there within work fine, but when I try to build it gives me an error saying that every method has been declared multiple times. I would post some source, but It would be quite lengthy. Has anyone every had this happen to them.
I did.

let's assume that your files are set up like this.

main.cpp
head.h
functions.cpp

head.h must have all the prototypes and variable declarations.
No definitions. and no #includes unless needed like <iostream> etc.

functions.cpp must have all you're function definitions and must:
#include "head.h"

Finally main.cpp should:
#include "head.h"

That's it ;)
That and don't forget inclusion guards in the headers.

This thread discusses a more complex example:
http://cplusplus.com/forum/general/46238/

Ok so here's what I did. I consolidated several header files into one called "Header.h." Then all my class definitions I put together in one file called "Classes.cpp." It may be relevant to mention that in my program "main.cpp" I did not included classes.cpp only header.h. Should I change that? Anyway now when I compile I get a error that says "undefined reference to class::method()." Any Ideas?
Last edited on
Ok nevermind I totally messed up and forgot to copy over one of my classes
Topic archived. No new replies allowed.