}
float attack(fighter2 target)
{
cout<<name<<"'s attack did "<<fighter1::strength<<" damage to "<<target.name<<endl;
cout<<target.name<<" health is now "<<(target.health -= fighter1::strength)<<endl;
return target.health;
}
Sorry, I've stopped laughing now. Saying "error 2248" is like going to the doctor's and saying "I think it hurts somewhere". In fact it's worse than that - you haven't even said which compiler you're using, so I can't even guess what error 2248 is ;-)
Have you added the }; after each class definition?
Can you copy and paste the compilation errors you're getting - the whole errors, with line numbers and everything.
Someone else may have to help you on this one though - our office has just had carpets laid and the glue stink is too bad - I'm off home!
Are fighter1 and fighter2 really supposed to be two unrelated classes both derived from characters? (you're not confusing the difference between instances of classes, with the classes themselves?)
If so, then fighter1::attack() really does not have access to the privates (or protected) members of fighter2 (as the compiler error is telling you :). You will need to either make fighter1 inherit from fighter2 (which would then be able to access protected members), or make fighter2 provide a bunch of public get-routines to allow fighter1 to access the data (eg "string getName() const { return name; };" etc). OR redesign your class hierarchy.