I'm fairly new to programming, and in my C++ class, we're currently working on classes. I have a program due on tuesday, and I began writing it yesterday. I thought I was almost done, but I'm stuck trying to actually run it. I have followed the structure of a few example programs our professor put up, so I don't think theres anything too wrong with what I'm doing. But when I try to compile using g++ weight.cpp driver.cpp or flipping the two files around, I still get a massive amount of compiler errors.
The class is "Weight". I have 3 total files - a driver program (main program) which I just started writing, the weight.cpp file (which has all the function definitions, utility functions, etc) and a weight.h file (class header file with the function members, private/public section, etc). I may just be royally screwing up the code, so if you guys could help me debug it, I'd appreciate it greatly.
Wow, I just potentially did the stupidest mistake ever. In transferring over my files from my main computer to my laptop, my header file got replaced with .cpp (which is why they are both identical here). WOOPS!
I feel like a total idiot. when it included the header file, it would just include another copy of itself :P.
Seems to be better now, just got a few compiler errors that I can probably work through.