I have a HUGE problem that is really putting a barrier between me, and development in C++. I understand pass by reference, But one thing I never seen explained is how to use it in classes(with header files) Just when I thought I was ready I ran into this problem. I'm going to have tons of variables and from what I understand pass by value isn't exactly "efficient" and pass by reference is what you do to pass variables to other functions and modify them without actually making a copy. So I've successfully done it before, But fail to pass, for example something I declare in main.cpp over to example.h and example.cpp.
Please leave an example with header files and explain in a brief paragraph how it is done.