The code tags are nice... but why on earth did you comment everything? that takes away the syntax highlighting >_>
Well thanks for the help but I mean it just says all my Identifiers don't exist which I don't understand |
Look at the lines giving you the error. Line 31 above is one of them
It's saying "m_Color" isn't declared, right? Think about it... where are you declaring m_Color? (hint: you're not. Look more closely at how you named your vars in your class: m_ExteriorColor). You did this with like 4 or 5 of your variables.
Then its says I need ; where they shouldn't be well I dont think they should be. |
This error isn't 100% believable. It could be one of any number of problems. When you get this error (or really, any error), look over the erroring line(s) of code and look for
anything that's wrong. Don't just look for a missing semicolon.
Take a close look at some of the lines that are giving you this error.
Specifically lines 31, 32, 33, etc. See any missing semicolons there? I sure do.
Line 164 probably gives you a similar error. There, though, it's not a missing semicolon that's a problem, but a missing comma.
----------
some other things:
1) You shouldn't have semicolons before the opening brace for function definitions. See lines 114, 123, etc
2) Make sure your class definitions (in the .cpp file) match the prototype (in the .h file). Notice that all of your Set() functions should return void according to the .h, but you have them returning string in the .cpp
3) Similar problem with your Get functions. They're all returning strings, when some should be returning bool/int/etc
4) For default parameters.... if you have them in the function prototype, don't put them in the function definition. IE: your construtor in the .cpp file should not have the default parameters listed.
And what am I doing that makes my Get/Set abusive? |
This isn't "wrong" per se. It's just a style thing.
What's the point of writing a dozen functions to set/get individual member variables? Why not just make the member variables public and access them directly? Saves you tons of time and makes your code way smaller.
There's nothing wrong with public data members in some cases. IMO this is one of those cases.