The reason I said accuracy was part of weapon was because I was thinking guns and snipers :) I don't know how we will distinguish between the two though. Maybe one accuracy on weapon and one for the "warrior".
Is it? Does not work for me, but if it is for you, try line i asked you.
I just want to show that too many constructors is rarely good and could lead to unexpected results. What do you think would happens when you run that line?
It will convert false to Armor I would guess, so it creates a temporary object. because of my Armor(bool). The funny thing is that that is probably what you would want it to do if you do that line. I see no reason to use it though.
EDIT: What does it actually do? I haven't tried it :P
It would call constructor which will ask you to enter armor parameters manually.
Imagine following construct
1 2
if(warrior->armor == NULL)
//...
It will compile without warnings, but will not do what you want.
And that way your warrior class always require iostream and gets input from cin, which isn't good if you ever move into dose graphic library.
My suggestion: leave only parametrized constuctor (which takes most arguments in your case), delete default constructor and create armor factory class:
Everything you say makes sense but I don't think there ever is a situation you would use it for something else and if you do you would make an operator function for it anyway. The user will never have access to that anyway because it is hidden under the armor class :) I see your point though, my design was terrible. That is one of the problems I have. Were did you learn about designing programs, do you have any recomendations? I wont have time to read any more books atm but it would be nice to know. Are you interested in helping out with this small fun project? Daleth made a github project for it :)
EDIT:
if you want you can finish the armor factory class and add it to our project :)
Basically a design for controlling the instantiation of objects, right? Or delegating the customization of a general class to its derived classes? I'm currently in the process of learning the factory method, so I can't say for sure.
Edit:
In response to Filiprei, there is no chat system on github. We could either make a thread in the lounge like the ChessPlusPlus group or host an IRC.
I can add you to our repository on GitHub, FredBill. So long as you have an internet connection, you'll have access to the current updates to the project files.
Is there some reason such a high percentage of your posts include the term "script kiddies?" It's almost like you're trying to come out of the script kiddie closet.